I am going to add safari extension in my app. I need biometric authentication for validate user. when I evaluate device owner authentication via Local Authentication then an error found.
[Error Domain=com.apple.LocalAuthentication Code=-1004 "Caller is not running foreground." UserInfo={NSDebugDescription=Caller is not running foreground., NSLocalizedDescription=User interaction required.}]
My Question is how may I force to safari extension to be in foreground to fix this issue? Or let me know if I can use any other way.
Code:
-(void)doBioMatricAuth{
context = [LAContext new];
context.localizedCancelTitle = @"Enter Username/Password";
if([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthentication error:nil]){
dispatch_async(dispatch_get_main_queue(), ^{
NSString *reason = @"Log in to your account";
[self->context evaluatePolicy:LAPolicyDeviceOwnerAuthentication localizedReason:reason reply:^(BOOL success, NSError * _Nullable error) {
if(success) {
NSLog(@"Biomatric success");
} else {
NSLog(@"Biomatric Failed %@",error.localizedDescription);
}
}];
});
}
}
Post
Replies
Boosts
Views
Activity
Everytime for any website/app we found empty serviceIdentifier in func prepareOneTimeCodeCredentialList(for serviceIdentifiers: [ASCredentialServiceIdentifier])
which cause we are unable to filter item as per domain or URL.
How app knows that Require Face ID is enable for them?
How app knows that they active after successfully authenticate by iOS 18 Require Face ID feature?
If any app implement any Extension(In my case Action Extension and Autofill Credential provider) then how they extension knows that they active after successfully authenticate by iOS 18 Require Face ID feature?
is there any app notification or any api to help me out?