我无法获得有关使用此代码支持任何类型身份验证的价值:
import SwiftUI
import LocalAuthentication
struct SecurityOption: View {
let context = LAContext()
var body: some View {
Form {
if (context.biometryType == .faceID) {
Section(header: ){
}
}
}
if (context.biometryType == .touchID) {
Section(header: ){
}
}
}
if (context.biometryType == .none) {
}
我想根据设备上的身份验证类型在表单中显示特定部分,但 .none 会不断触发。在带有 iOS 13.2 的真实 iPhone X 上测试