Touch and Face ID in SwiftUI

Hello
Is there a way to know if the detected finger or face are wrong?

I am using this function:

Code Block
func authenticate() {
let context = LAContext()
var error: NSError?
if context.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error) {
let reason = "We need to unlock your data."
context.evaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, localizedReason: reason) { success, authenticationError in
DispatchQueue.main.async {
if success {
self.isUnlocked = true
} else {
userPressedCancel = false
}
}
}
} else {
}
}


Is there a way to know if the detected finger or face are wrong?

Can you elaborate on what you mean by “wrong” here?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Touch and Face ID in SwiftUI
 
 
Q