File tree Expand file tree Collapse file tree
TOPasscodeViewControllerExample Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,15 +103,22 @@ - (void)didPerformBiometricValidationRequestInPasscodeViewController:(TOPasscode
103103 return ;
104104 }
105105
106- // The user hit the 'Cancel' button in the Touch ID dialog
107- // (Use this to dismiss the controller if desired, but do not show the protected content)
106+ // The user hit 'Enter Password'. This should probably do nothing
107+ // but make sure the passcode controller is visible.
108+ if (error.code == kLAErrorUserFallback ) {
109+ NSLog (@" User tapped 'Enter Password'" );
110+ return ;
111+ }
112+
113+ // The user hit the 'Cancel' button in the Touch ID dialog.
114+ // At this point, you could either simply return the user to the passcode controller,
115+ // or dismiss the protected content and go back to a safer point in your app (Like the login page).
108116 if (error.code == LAErrorUserCancel) {
109- [weakSelf dismissViewControllerAnimated: YES completion: nil ] ;
117+ NSLog ( @" User tapped cancel. " ) ;
110118 return ;
111119 }
112120
113- // The other main error would be if the user hit 'Enter Passcode', in which case they can enter
114- // their passcode manually into the passcode controller
121+ // There shouldn't be any other potential errors, but just in case
115122 NSLog (@" %@ " , error.localizedDescription );
116123 };
117124
You can’t perform that action at this time.
0 commit comments