IOS指纹实现
既然苹果发布了在iOS 7中具有指纹扫描功能的Xcode 5,我们可以在我们的应用程序中实现这一功能吗?如果是,我们使用哪个SDK来实现IOS指纹实现,ios,ios7,xcode5,fingerprint,Ios,Ios7,Xcode5,Fingerprint,既然苹果发布了在iOS 7中具有指纹扫描功能的Xcode 5,我们可以在我们的应用程序中实现这一功能吗?如果是,我们使用哪个SDK来实现 请提供示例代码,或者指定我们使用的SDK。否指纹扫描仪对开发人员不可用,它在当前SDK中可用 使用即将推出的iOS 8 SDK,您将能够通过官方SDK使用指纹扫描仪 您可以在文档中阅读有关TouchID的更多信息。可以通过使用可用于评估安全策略的LAContext(本地身份验证框架)来实现。它使用Touch ID传感器检查身份验证的人是否是设备所有者。将来可能
请提供示例代码,或者指定我们使用的SDK。否指纹扫描仪对开发人员不可用,它在当前SDK中可用 使用即将推出的iOS 8 SDK,您将能够通过官方SDK使用指纹扫描仪
您可以在文档中阅读有关TouchID的更多信息。可以通过使用可用于评估安全策略的LAContext(本地身份验证框架)来实现。它使用Touch ID传感器检查身份验证的人是否是设备所有者。将来可能会有其他安全策略 以下是相同的代码段:
-(void)handlerForFingerTouch{
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;
}
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];
}
}
@rckoenes是对的,苹果开发中心论坛讨论读到了这一点,这在iOS 8中正在改变。@Zaph你是对的,但由于我没有浏览我所有的帖子,并在每次新的SDK出现时更改它们,所以这个答案不会更新。