【发布时间】:2020-02-27 10:55:45
【问题描述】:
我无法获得有关使用此代码支持任何类型身份验证的价值:
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 上测试
【问题讨论】:
标签: swiftui xcode11 localauthentication