Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经在我的应用程序中实现了人脸 ID API。目前 Face id 已为设备注册,但为我的应用程序禁用。
如何在 Swift 中以编程方式检查我的应用是否启用了 Face id?
我知道要检查人脸 ID 是否已在设备中注册。
let context = LAContext() if ( context.biometryType == .typeFaceID ) { // Face ID } if ( context.biometryType == .typeTouchID) { // Touch ID } else { // Stone Age }
不要忘记设置版本控制条件,因为 faceID 仅在 ios 11 之后可用