LAContext has method to check if device can evaluate touch ID and gives error message. Problem is that same error message \"LAErrorPasscodeNotSet\" is given by system in two cas
You can find out if a device supports Biometric scanning (touchID and faceID) by checking the error code as shown below:
func deviceSupportsBiometricScanning() -> Bool {
var authError: NSError?
let _ = LAContext().canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &authError)
return authError?.code != kLAErrorBiometryNotAvailable.hashValue
}