Xcode 9.3 (beta)
显示枚举错误
LABiometryType
,这与
Xcode 9.2
带支票
available(iOS 11.0, *)
.
以下是错误消息:
“LABiometryType”仅在iOS 11.0.1或更新版本上可用
这是我现有的代码:
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
}
问题是:如果我更换
#available(iOS 11.0, *)
具有
#available(iOS 11.0.1, *)
正如错误消息中所建议的,那么如何处理面部id生物测量(
LABiometryType.faceID
)对于iOS 11.0。