我正在使用 touch id 来验证用于登录我的应用程序。
我的代码
- (void)evaluatePolicyWithCompletion:(LASuccessBlock)successblock failure:(LAFailureBlock)failure
{
LAContext *context = [[LAContext alloc] init];
// show the authentication UI with our reason string
[context evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:NSLocalizedString(@"UNLOCK ACCESS TO LOCKED", nil) reply:
^(BOOL success, NSError *authenticationError) {
if(success)
successblock();
else
failure(authenticationError);
}];
}
它返回 touch id 验证的结果。
在这里,如果用户选择输入密码而不是触摸 ID,我是否必须将用户重定向到我的登录屏幕以输入他/她的登录凭据,或者有什么方法可以使用设备密码来验证用户。