LAContext *myContext = [[LAContext alloc] init];
NSString *reason = @"请验证已有指纹";
myContext.localizedFallbackTitle = @"";
[myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:reason reply:^(BOOL success, NSError *error) {
//放入主线程
dispatch_async(dispatch_get_main_queue(), ^{
if(success){//成功
[self loginWithTouchID];
}else{
if(error.code == -2){//点击取消按钮
}
}
});
}];
ios 指纹登陆
最新推荐文章于 2022-06-10 15:39:34 发布