IOS8 Touch ID getting error: pending UI engine already installed
The error description is below:
Error Domain=com.apple.LocalAuthentication Code=-1000 "Pending UI mechanism already set." UserInfo=0x17406b0c0 {NSLocalizedDescription=Pending UI mechanism already set.}
I am also trying to use the Apple example and get the same error. It used to work fine, but it stopped working suddenly instead of working. Please, help.
I am using an iPhone 6 with iOS 8.1
source to share
This code just worked fine for me.
LAContext *myContext = [[LAContext alloc] init];
NSError *authError = nil;
NSString *myLocalizedReasonString = @"String explaining why app needs authentication";
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(@"User authenticated successfully, take appropriate action");
} else {
// User did not authenticate successfully, look at error and take appropriate action
NSLog(@"User did not authenticate successfully, look at error and take appropriate action");
}
}];
} else {
// Could not evaluate policy; look at authError and present an appropriate message to user
NSLog(@"Could not evaluate policy: %@",authError);
}
Don't forget to import the local authentication framework. <LocalAuthentication/LAContext.h>.
Hope this solves your problem.
source to share
Try restarting your phone.
I also started getting this error and decided to see if other apps were affected. I have Dropbox and Mint for Touch ID installed. Of course, Touch ID didn't work for them either, and they reverted to passwords.
I rebooted my phone and it started working again, so it would seem like Touch ID could fix the errors and stop working. I am on iOS 8.2 bit.
I am guessing the correct way to deal with this state is to do the same with apps and fallback to password / password.
source to share