From the course: Biometric Authentication for iOS in Swift

Unlock the full course today

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

Handling fallback

Handling fallback

From the course: Biometric Authentication for iOS in Swift

Start my 1-month free trial

Handling fallback

- [Instructor] So now let's handle something interesting in the case of user fallback. First thing I want to do is on line 60 to 62 comment out this timer so we don't cancel it. Also I want to make sure that we're using device owner authentication with biometrics so that the fallback comes back to us and not the system. So here in the fallback I want to call a function that I'm going to title prompt for code. So on line 52 I'm going to add self prompt for code. And now we need to go implement this. So at the bottom of the file I'm going to add a new function on line 95 called function prompt for code, no parameters, open closed curly braces. And in here I'm going to use an alert controller to prompt the user with a message and the ability to input a code. So I'm going to say on line 96 let ac equal UI alert controller and I'll use the code complete that takes a title. And I'll name it something like enter code. Tab over to the message and say enter your user code. Remember the HIG…

Contents