我想使用TouchID验证我自己的应用程序.
1.我希望用户可以点击"输入密码"来调用系统内置密码屏幕进行身份验证,如果成功则输入我自己的应用程序.
但我不知道如何将它转发到密码验证视图,如'case LAErrorUserFallback'中的以下屏幕

这是我的代码:
LAContext *context = [[LAContext alloc] init];
__block NSString *msg;
__block BOOL bAuth;
// show the authentication UI with our reason string
[context evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:NSLocalizedString(@"Unlock APP With FingerPrint", nil) reply:
^(BOOL success, NSError *authenticationError) {
if (success) {
bAuth = YES;
msg =[NSString stringWithFormat:NSLocalizedString(@"EVALUATE_POLICY_SUCCESS", nil)];
dispatch_async(dispatch_get_main_queue(), ^{
[[MYAppDelegate theDelegate] initializeAppAfterKeyVaultUnlocked];
});
NSLog(@"%@",msg);
} else {
bAuth = NO;
switch (authenticationError.code) {
case LAErrorAuthenticationFailed:
msg = [NSString stringWithFormat:NSLocalizedString(@"Authentication Failed", nil)];
// ...
break;
case LAErrorUserCancel: …Run Code Online (Sandbox Code Playgroud) 使用命令行查看diff代码非常困难.是否有任何GUI工具或只是使用语法高亮命令行工具来查看svn代码行的代码更改.
我正在使用Xcode6-beta5将触摸ID身份验证集成到我自己的应用程序中.使用以下代码运行在真实设备iphone5s(iOS8-beta5)上.已经#import.
LAContext *myContext = [[LAContext alloc] init];
NSError *authError = nil;
NSString *myLocalizedReasonString = @"use touch id to unlock app";
if ([myContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) {
[myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
localizedReason:myLocalizedReasonString
reply:^(BOOL success, NSError *error) {
if (success) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"success" message:@"pass auth" delegate:self cancelButtonTitle:NSLocalizedString(@"OK", @"OK button") otherButtonTitles:nil];
[alert show];
[alert release];
// User authenticated successfully, take appropriate action
} else {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"fail" message:@"fail auth" delegate:self cancelButtonTitle:NSLocalizedString(@"OK", @"OK button") otherButtonTitles:nil];
[alert show];
[alert release]; …Run Code Online (Sandbox Code Playgroud) ios8 ×2
diff ×1
fallback ×1
fingerprint ×1
macos ×1
objective-c ×1
svn ×1
touch-id ×1
xcode6 ×1