有没有办法获得某种触摸ID身份验证字符串?我想将它用作密码并将其与用户名相关联。
谢谢!
答案 0 :(得分:0)
没有。没有办法做到这一点。 LAContext类为您提供了几种状态(传递,失败,取消等等)但您没有获得任何其他数据。以下是LAError.h文件中可能的状态值。
/// Authentication was not successful, because user failed to provide valid credentials.
LAErrorAuthenticationFailed = kLAErrorAuthenticationFailed,
/// Authentication was canceled by user (e.g. tapped Cancel button).
LAErrorUserCancel = kLAErrorUserCancel,
/// Authentication was canceled, because the user tapped the fallback button (Enter Password).
LAErrorUserFallback = kLAErrorUserFallback,
/// Authentication was canceled by system (e.g. another application went to foreground).
LAErrorSystemCancel = kLAErrorSystemCancel,
/// Authentication could not start, because passcode is not set on the device.
LAErrorPasscodeNotSet = kLAErrorPasscodeNotSet,
/// Authentication could not start, because Touch ID is not available on the device.
LAErrorTouchIDNotAvailable = kLAErrorTouchIDNotAvailable,
/// Authentication could not start, because Touch ID has no enrolled fingers.
LAErrorTouchIDNotEnrolled = kLAErrorTouchIDNotEnrolled,