![](/img/trans.png)
[英]Swift 3 - “NSPersistentContainer is only available on ios 10 and newer”
[英]'LABiometryType' is only available on iOS 11.0.1 or newer
Xcode 9.3(beta)顯示枚舉LABiometryType
的錯誤,它與Xcode 9.2
一起工作正常, available(iOS 11.0, *)
支票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, *)
,那么如何處理iOS 11.0的Face-id生物測量( LABiometryType.faceID
)。
您不需要在iOS 11.0上處理Face ID,因為iPhone X是隨iOS 11.0.1發布的。 iOS 11.0上沒有具有Face ID功能的iOS設備。
請參閱https://en.wikipedia.org/wiki/IOS_version_history#iOS_11_0和https://en.wikipedia.org/wiki/IPhone_X
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.