I see dozens of crashes in fabric
Fatal Exception: NSInvalidArgumentException
-[LAContext biometryType]: unrecognized selector sent to instance 0x1c066aa00
And it's strange because I do call biometryType on LAContext only for iOS 11+.
The code:
private static var biometryType: BiometryType? {
let context = LAContext()
guard context.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: nil),
context.evaluatedPolicyDomainState == BiometryManager.savedPolicyDomainState else { return nil }
if #available(iOS 11.0, *) {
switch context.biometryType {
case .typeFaceID: return .typeFaceID
case .typeTouchID: return .typeTouchID
case .none: return nil
}
}
return .typeTouchID
}
Any suggestions?
The only clue I have is that all crashes related to 11.0.0. So maybe Apple added biometryType not in 11.0.0 but a bit later.
Links:
https://developer.apple.com/documentation/localauthentication/lacontext/2867583-biometrytype
nil
in for the error parameter inLAContext.canEvaluatePolicy
?