LABiometryType 属性仅在 canEvaluatePolicy 生物识别策略成功时设置。
如何在注册前识别设备上的 touch id 或 face id?如果设备尚未注册,我们希望在应用程序中向用户显示一条消息,即“注册触摸 ID”或“注册面部 ID”。我们不想放置任何特定于设备的代码。
LABiometryType 属性仅在 canEvaluatePolicy 生物识别策略成功时设置。
如何在注册前识别设备上的 touch id 或 face id?如果设备尚未注册,我们希望在应用程序中向用户显示一条消息,即“注册触摸 ID”或“注册面部 ID”。我们不想放置任何特定于设备的代码。
You can't tell before you try to enroll.
You should design your app so a user first authenticates with your fallback mechanism (assuming it's not just the PIN, but something like user/pwd) and then you call canEvaluatePolicy to ask them to enroll after that succeeds. If that doesn't fail with a -6 (not supported on device) error, then store a flag indicating that it's supported on the device. Configure your UI and login flow based on that stored setting.