2
有沒有辦法確定是否有已註冊的指紋,但由於失敗的指紋認證過多,觸摸ID當前處於「暫停」狀態?TouchID「開」與「開但暫停」
有沒有辦法確定是否有已註冊的指紋,但由於失敗的指紋認證過多,觸摸ID當前處於「暫停」狀態?TouchID「開」與「開但暫停」
錯誤代碼可以與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 = "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
}
在Objective C中,這裏需要的具體情況是'LAErrorTouchIDLockout'。 –
我不明白這個問題是如何「太寬泛」。這很清楚,並要求一個具體的問題。 –