gpt4 book ai didi

ios - ios中使用Touch ID的不同指纹

转载 作者:行者123 更新时间:2023-12-01 19:48:09 25 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





How can I differentiate between fingerprints with TOUCH ID [duplicate]

(1 个回答)



Know which user logging into app depending on touchid in iOS

(1 个回答)


4年前关闭。




我正在开发一个使用 Touch ID 的应用程序。我已将 Touch 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 个指纹,比如 Alice 和 Bob。身份验证适用于两种指纹,没有任何问题。

但我需要显示哪个指纹用户已通过身份验证。

有什么方法可以访问它吗?

最佳答案

你怎么知道哪个用户是哪个?它们没有名字,iOS 中也没有内置身份管理基础。

你只需要相信,如果添加指纹的人通过添加指纹来信任其他人,他们就可以访问 TouchID 授权的所有内容。

关于ios - ios中使用Touch ID的不同指纹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47427814/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com