'LABiometryType' is only available on iOS 11.0.1 or newer

1.6k Views Asked by At

Xcode 9.3 (beta) showing an error for enum LABiometryType, which was working fine with Xcode 9.2 with check available(iOS 11.0, *).

Here is error message:

'LABiometryType' is only available on iOS 11.0.1 or newer

enter image description here

Here is my existing code:

if #available(iOS 11.0, *) {
    if (laContext.biometryType == LABiometryType.faceID) {
        //localizedReason = "Unlock using Face ID"
        print("FaceId support")
    } else if (laContext.biometryType == LABiometryType.touchID) {
        //localizedReason = "Unlock using Touch ID"
        print("TouchId support")
    } else {
        //localizedReason = "Unlock using Application Passcode"
        print("No Biometric support")
    }
} else {
    // Fallback on earlier versions
}

Problem is: If I replace #available(iOS 11.0, *) with #available(iOS 11.0.1, *) as suggested in error message, then how to handle Face-id biometry (LABiometryType.faceID) for iOS 11.0.

1

There are 1 best solutions below

3
naglerrr On BEST ANSWER

You don't need to handle Face ID on iOS 11.0 because the iPhone X was released with iOS 11.0.1. There is no iOS device on iOS 11.0 that has Face ID capabilities.

See https://en.wikipedia.org/wiki/IOS_version_history#iOS_11_0 and https://en.wikipedia.org/wiki/IPhone_X