How to use system build-in passcode screen to authenticate my App when user clicks Enter Password

烈酒焚心 提交于 2020-01-13 12:07:11

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!