// 判断设备是否支持指纹识别
LAContext*lacontext = [[LAContextalloc]init];
BOOLsupport = [lacontextcanEvaluatePolicy:LAPolicyDeviceOwnerAuthentication error:NULL];
if(@available(iOS11.0, *)){
if([lacontextrespondsToSelector:@selector(biometryType)]){
if(lacontext.biometryType==LABiometryTypeFaceID) {
//@"面容ID登录"
}else if(lacontext.biometryType==LABiometryTypeTouchID){
//@"指纹登录";
}else{
//未授权
}}}
网友评论