I have an app that uses LAContext and Touch ID to assist user log in. I have noticed that when users upgrade from iOS 9 to iOS 10 the evaluatedPolicyDomainState seems to change causing the login to fail.
Here is my code:
//Get the current domain state:
LAContext *context = [[LAContext alloc] init];
[self checkDomainState:context.evaluatedPolicyDomainState]
// Check against the previously saved domain state
-(BOOL)checkDomainState:(NSData *)domainState {
NSData *previousDomainState = [UICKeyChainStore dataForKey:@"SavedDomainState" service:@APP_ID]; // Pull previous saved state from the keychain
if (previousDomainState.length == 0 || previousDomainState == nil) {
[self saveInitialFingerprintDomainState]; // Domain state not saved, save initial domain state.
return TRUE;
}
return [domainState isEqualToData:previousDomainState]; // Evaluate if the saved state is the same as the current state
}
Does anyone know if Apple changed the domain state structure between iOS 9 and iOS 10? I have gone through the iOS 10 doumentation, but have seen nothing that might be causing this issue. Any help you can give me is gratly appreciated.
Thank you.