苹果手机指纹验证
来源:互联网 发布:淘宝怎样设置拍下立减 编辑:程序博客网 时间:2024/04/19 14:50
先导入一个库文件
#import <LocalAuthentication/LocalAuthentication.h>
//此方法专门用来印证用户的指纹
- (void)anthenticationUser
{
LAContext *content = [[LAContextalloc]init];
content.localizedFallbackTitle =@"输入密码";
NSError *error =nil;
NSString *text =@"请验证已有指纹";
if ([contentcanEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometricserror:&error]) {
[content evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometricslocalizedReason:textreply:^(BOOL success,NSError *error) {
dispatch_async(dispatch_get_main_queue(), ^{
if (success) {
[selfshowHud:@"指纹验证成功"];
}else{
DLog(@"error.description = %@ %@",error.description,error.userInfo);
NSString *errorDescription;
if (error.code ==LAErrorAuthenticationFailed) {
errorDescription = @"指纹认证失败";
}
//iOS9.0
// else if (error.code == LAErrorAppCancel) {
// errorDescription = @"认证被APP取消";
// }
elseif (error.code ==LAErrorSystemCancel) {
errorDescription = @"认证被系统取消";
}elseif (error.code ==LAErrorUserCancel) {
errorDescription = @"点击取消按钮";
}elseif (error.code ==LAErrorUserFallback) {
errorDescription = @"点击输入密码按钮";
}else{
errorDescription = @"指纹验证失败";
}
DLog(@"%@",errorDescription);
[selfshowHud:errorDescription];
}
});
}];
}else{
DLog(@"error.description = %@ %@",error.description,error.userInfo);
dispatch_async(dispatch_get_main_queue(), ^{
NSString *errorDescription;
if (error.code ==LAErrorTouchIDNotAvailable) {
errorDescription = @"Touch ID不可用";
}elseif (error.code ==LAErrorTouchIDNotEnrolled) {
errorDescription = @"TouchID尚未被录入";
}
//iOS9.0
// else if (error.code == LAErrorTouchIDLockout) {
// errorDescription = @"失败次数过多,请输入密码解锁";
// }
elseif (error.code ==LAErrorPasscodeNotSet) {
errorDescription = @"尚未设置密码";
}else{
errorDescription = @"该设备不支持Touch ID";
}
DLog(@"%@",errorDescription);
[selfshowHud:errorDescription];
});
}
}
- 苹果手机指纹验证
- 指纹验证
- 安卓手机的指纹按钮做成苹果的home键
- ZKTFinger指纹验证过程
- iOS8指纹验证TouchID
- iOS TouchID指纹验证
- android 指纹验证api
- iOS 指纹验证
- 指纹验证错误码
- iOS 指纹验证
- 获取手机指纹库指纹信息
- <iOS> 设备验证 指纹验证
- 【iOS初学笔记】验证指纹
- CECT指纹加密手机2008新款
- Android手机指纹驱动工作原理
- iOS开发之Touch ID指纹验证
- swift-集成touch id功能 指纹验证
- iOS 获取Home键指纹验证
- 【图的DFS】图的DFS非递归算法
- GridView的模版列中加入按钮,触发按钮事件后,如何获取该行的某个值?
- An SDK corresponding to WDK version '8.1' was not found. Please install the SDK before building.
- facebook 照片存储系统haystack的学习
- swift中UIbutton的布局
- 苹果手机指纹验证
- MVC
- LoadRunner 之 IP欺骗
- Java体系和一些基本概念
- DEBUG:mysql数据库绿色版设置初始密码
- VCL 中文man page(1)
- 论scrollView里button TouchDown的问题
- TCP三次握手分析、http登录密码抓取
- 合并Bitmap抠图出现黑色区域