From the course: Biometric Authentication for iOS in Swift

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Notifying the user for Face ID

Notifying the user for Face ID

From the course: Biometric Authentication for iOS in Swift

Start my 1-month free trial

Notifying the user for Face ID

- [Instructor] So now let's run this to see what happens. I'm going to put a couple break points for the check to "canEvaluatePolicy", the actual evaluation of the policy and in the closure, so lines 27, 28, and 29. I've got the iPhone Xr selected as my simulator. So let's run this. So it starts up and calls evaluate policy and I'm going to step over this line to see if we can evaluate the policy. And notice that it can't. The errors are "No identities are enrolled." So let's go to the simulator and enroll. So now in the simulator, under the "Hardware" dropdown menu, we can go to "Face ID" and click "Enrolled". Now let's run the app again. Now when I step through the code, we'll see that we can evaluate it, and we'll call to evaluate it. So I'm going to continue from here and then jump over to the simulator. So now in the simulator notice we get the first pop-up to get authorization, not authentication, to use Face ID. And we see our message from our plist. I'll click "OK" and then…

Contents