Get biometrics state from the home widget

Is it possible to determine if the device has Touch/Face ID from the home widget? And was it enabled.

authError.code equals to kLAErrorBiometryNotAvailable when this code runs from the home widget on the real device. Nevertheless, it works correctly in the Simulator.

Code Block
var authError: NSError?
LAContext().canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &authError)


It is a bug or a feature?
Biometrics are, in general, only rated for use by apps. They are not supported in app extensions.

This applies to both the LocalAuthentication framework and the biometric support within the keychain.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Get biometrics state from the home widget
 
 
Q