iOS 指纹解锁

来源:互联网 发布:淘宝搜索宝贝显示地址 编辑:程序博客网 时间:2024/05/01 19:49
- (void)evaluatePolicy{    LAContext *context = [[LAContext alloc] init];    __block  NSString *msg;         // show the authentication UI with our reason string    [context evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:NSLocalizedString(@"UNLOCK_ACCESS_TO_LOCKED_FATURE", nil) reply:     ^(BOOL success, NSError *authenticationError) {         if (success) {             msg =[NSString stringWithFormat:NSLocalizedString(@"EVALUATE_POLICY_SUCCESS", nil)];         } else {             msg = [NSString stringWithFormat:NSLocalizedString(@"EVALUATE_POLICY_WITH_ERROR", nil), authenticationError.localizedDescription];         }         [self printResult:self.textView message:msg];     }];     }
0 0
原创粉丝点击