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.

Biometric types

Biometric types

From the course: Biometric Authentication for iOS in Swift

Start my 1-month free trial

Biometric types

- [Instructor] I mentioned before how the secure enclave doesn't give you much information back. Really just success, true or false and an error if one occurred, so it doesn't tell you if they were successful with Face ID, Touch ID, passcode, just whether or not it was successful. But we can get the type based on the context, and you have to do this after the call to canEvaluatepPolicy, whether it is successful or not. And we can do a switch on that, and on line 25 I'll add an extra line, and type switch context biometryType and I'll do a switch on this with the three cases. Face ID, in which case we might want to give them some indication that we're going to be using Face ID, so they're not surprised when it pops up and then immediately goes away. And then line 32, I'll type case.touchID and print touch on line 33. And then the final one, case.none and I'll print none. So now that we're handling all these cases, everything's fine. But what's this warning for? This is strange. It…

Contents