我正在使用使用触摸ID的应用程序。我已经将触摸ID集成到应用程序中,以验证用户访问某些应用元素,并且效果很好。
LAContext *context = [[LAContext alloc] init];
NSError *error = nil;
if ([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]) {
[context evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:@"Are you the device owner?" reply:^(BOOL success, NSError *error) {
if (error) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
message:@"There was a problem verifying your identity."
delegate:nil
cancelButtonTitle:@"Ok"
otherButtonTitles:nil];
[alert show];
return;
}
NSLog(@"%@",context);
if (success) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Success"
message:@"You are the device owner!"
delegate:nil
cancelButtonTitle:@"Ok"
otherButtonTitles:nil];
[alert show];
} else {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
message:@"You are not the device owner."
delegate:nil
cancelButtonTitle:@"Ok"
otherButtonTitles:nil];
[alert show];
}
}];
} else {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
message:@"Your device cannot authenticate using TouchID."
delegate:nil
cancelButtonTitle:@"Ok"
otherButtonTitles:nil];
[alert show];
}
现在,假设是否有2个指纹,例如爱丽丝和鲍勃。身份验证适用于两种指纹无问题的指纹。
,但我需要证明已验证了哪个指纹用户。
有什么方法可以访问它?
您如何知道哪个用户是哪个?他们没有名称,并且iOS中没有内置的身份管理基材。
您只需要相信,如果添加指纹的人通过添加指纹来信任他人,那么他们就可以访问所有触摸IDID的授权。