4
내 앱에서 가로 모드 인 TouchID 만 사용하고 싶습니다. 모든 것이 정상이지만 인증 경고는 세로 모드에서만 표시됩니다. 나는 어떻게해야합니까?가로 모드에서 TouchID를 사용하려면 어떻게해야합니까?
여기 내 코드입니다 :
LAContext *myContext = [[LAContext alloc] init];
NSError *authError = nil;
NSString *myLocalizedReasonString = [[NSString alloc] initWithUTF8String: title];
if ([myContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) {
[myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
localizedReason:myLocalizedReasonString
reply:^(BOOL success, NSError *error) {
if (success) {
// User authenticated successfully, take appropriate action
NSLog(@"Authenticated using Touch ID.");
//do something
} else {
// User did not authenticate successfully, look at error and take appropriate action
if (authError.code == kLAErrorUserFallback) {
NSLog(@"User tapped Enter Password");
} else if (authError.code == kLAErrorUserCancel) {
NSLog(@"User tapped Cancel");
} else {
NSLog(@"Authenticated failed.");
}
}
}];
} else {
// Could not evaluate policy; look at authError and present an appropriate message to user
NSLog(@"Touch ID is not available: %@", authError);
}
Martin-Gilles Lavoie :이 버그가 수정 되었습니까? –
아직 iOS 9b를 사용할 기회가 없었습니다. 출시가 가까워지고 Legal이 아직 iOS9b 라이센스를 승인하지 않았기 때문에. 더구나, tyically, Apple는 방출 후에 단지 레이다 웹을 새롭게한다. –
지금까지는 꽤 뻔한 것 같지만, iOS 9.1부터는 여전히 Apple에 의해 수정되지 않았다는 기록을 세울 것입니다. –