As found in documentation (die reine Schule) checking canEvaluatePolicy() first

This commit is contained in:
dankito 2020-10-23 01:25:09 +02:00
parent 195a46361d
commit 02af929744
1 changed files with 7 additions and 1 deletions

View File

@ -7,7 +7,13 @@ class BiometricAuthenticationService {
var biometryType: LABiometryType {
localAuthenticationContext.biometryType
var error: NSError?
if localAuthenticationContext.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error) {
return localAuthenticationContext.biometryType
}
return .none
}
var isFaceIDSupported: Bool {