On older iPhones such as the 6, 6s etc. The biometric authentication dialogue/alert is hidden. If you press the home button on the iPhone to authenticate via a fingerprint it still works, but the dialogue/alert is hidden, which is a source of confusion for users.
Various sources (1) (2) have reported this as an iOS 13 bug.
This worked correctly on iOS 12, the issue started on iOS 13.
My biometric auth code looks like this and is fired in a view controller's viewDidAppear method:
let localAuthContext = LAContext()
var error: NSError?
if localAuthContext.canEvaluatePolicy(LAPolicy.deviceOwnerAuthenticationWithBiometrics, error: &error) {
localAuthContext.evaluatePolicy(LAPolicy.deviceOwnerAuthenticationWithBiometrics, localizedReason: "SIGNIN.TITLE.Login".localized) { [weak self] (success, error) in
if success {
// success
} else {
// failure
}
}
} else {
// can't evaluate policy
}
So, do I need to change something in my code for iOS 13, or is this an Apple issue?
It seems to be issue in processing. I've fixed this issue by showing it from main queue so it will surely show maybe after delay but it will not remain hidden.
DispatchQueue.main.async {
if localAuthContext.canEvaluatePolicy(LAPolicy.deviceOwnerAuthenticationWithBiometrics, error: &error) {
localAuthContext.evaluatePolicy(LAPolicy.deviceOwnerAuthenticationWithBiometrics, localizedReason: "SIGNIN.TITLE.Login".localized) { [weak self] (success, error) in
if success {
// success
} else {
// failure
}
}
} else {
// can't evaluate policy
}
}
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