OStack程序员社区-中国程序员成长平台

标题: ios - TouchID "On"与 "On but suspended" [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 22:38
标题: ios - TouchID "On"与 "On but suspended"

有没有办法确定是否有指纹注册,但由于指纹认证失败太多,Touch ID 目前处于“暂停”状态?



Best Answer-推荐答案


可以将错误代码与 LAError 类进行比较。

func errorMessageForLAErrorCode( errorCode:Int ) -> String{

        var message = ""

        switch errorCode {

        case LAError.AppCancel.rawValue:
            message = "Authentication was cancelled by application"

        case LAError.AuthenticationFailed.rawValue:
            message = "The user failed to provide valid credentials"

        case LAError.InvalidContext.rawValue:
            message = "The context is invalid"

        case LAError.PasscodeNotSet.rawValue:
            message = "asscode is not set on the device"

        case LAError.SystemCancel.rawValue:
            message = "Authentication was cancelled by the system"

        case LAError.TouchIDLockout.rawValue:
            message = "Too many failed attempts."

        case LAError.TouchIDNotAvailable.rawValue:
            message = "TouchID is not available on the device"

        case LAError.UserCancel.rawValue:
            message = "The user did cancel"

        case LAError.UserFallback.rawValue:
            message = "The user chose to use the fallback"

        default:
            message = "Did not find error code on LAError object"

        }

        return message

    }

关于ios - TouchID "On"与 "On but suspended",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40163958/






欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) Powered by Discuz! X3.4