ios - TouchID "On"与 "On but suspended"
<p><p>有没有办法确定是否有指纹注册,但由于指纹认证失败太多,Touch ID 目前处于“暂停”状态?</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>可以将错误代码与 LAError 类进行比较。 </p>
<pre><code>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 = "Passcode 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
}
</code></pre></p>
<p style="font-size: 20px;">关于ios - TouchID"On"与"On but suspended",我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/40163958/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/40163958/
</a>
</p>
页:
[1]