FaceID allows storage of credentials but not retrival. I'm seeing this error when inspecting via the xcode console. If I run the same code from xcode locally everything works fine.
returned Error Domain=com.apple.LocalAuthentication Code=-1004 "Caller is not running foreground."
To make it even more strange if I install a different version from testflight and then reinstall the original broken version it starts working again.
We've encountered this error as well in our app, but as it turned out, it was caused by having multiple apps with the same Product Name on one device.
In our case this means that we will not have this on our live app, but this came up on devices of our tester.
This error always comes up for me as -1004 so I added a check to my error handling block like this:
...
if let error = authError as? LAError {
if (error.code.rawValue == -1004) { //bizarre facial recognition error
completion(true, //do some code..)
}
completion(false, error)
}...
works on my production application
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With