问题
I'm integrating TouchID into my app, How can I use 'Enter passcode' option present system build-in passcode screen to authenticate my app.? Any one please explain how to handle case 'LAErrorUserFallback' in objective C.
回答1:
You cannot do that. What you can do is use that option to show your own password screen. In your reply block you check the NSError object and switch off the fallback code.
....replyBlock:^(BOOL success, NSError *error) {
if (error)
{
switch (error.code)
case LAErrorUserFallback:
Now here you can do whatever your app wants to do for app specific, not device specific, authentication. (Basically, you can do whatever you did before you had Touch ID available.)
Update:
See NicolasMiari's comment, which refers to https://www.secsign.com/fingerprint-validation-as-an-alternative-to-passcodes/ which may have a solution.
来源:https://stackoverflow.com/questions/28426033/how-to-use-system-build-in-passcode-screen-to-authenticate-my-app-when-user-clic