在我们的应用程序中,用户必须注册到设备biometry才能使用它进行身份验证.注册文本和法律注释是根据相关的生物统计学(注册到触摸ID或注册到面部ID)据我发现,生物测定类型可以通过LAContext获得,但如果用户拒绝使用生物测量,那么上下文返回biometryType = .none
任何其他要求屏幕尺寸和与iPhone X(坏的坏代码)比较的想法?
static fileprivate var biometryType: DSLocalAuthenticationBiometryType {
let context = LAContext()
var error: NSError?
let _ = context.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error)
if #available(iOS 11.0, *) {
return context.biometryType == .typeFaceID ? .typeFaceID : .none
}
else {
return .none
}
}
Run Code Online (Sandbox Code Playgroud)
谢谢
用户WatchKit 2.0,iOS 9.0时,NSURLSession会自动发送用户代理吗?有没有办法在WatchKit应用程序中验证这一点?