如何以编程方式检查对"Face ID"和"Touch ID"的支持 [英] How to programmatically check support of 'Face Id' and 'Touch Id'

查看:106
本文介绍了如何以编程方式检查对"Face ID"和"Touch ID"的支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于我的应用程序安全目的,我已经集成了 LocalAuthentication ,该应用程序一直支持基于触摸ID" 的支持.但是现在,苹果公司最近还添加了基于'Face Id'的身份验证.

I've integrated LocalAuthentication for my app security purpose, which has been supporting 'Touch Id' based supporting. But now, apple has recently added 'Face Id' based authentication also.

如何检查设备支持哪种身份验证.触摸ID或面孔ID?

How can I check, which type of authentication is supported by a device. Touch Id or Face Id?

推荐答案

使用Xcode 9,请查看本地身份验证-> LAContext-> LABiometryType .

With Xcode 9, Look at LocalAuthentication -> LAContext -> LABiometryType.

LABiometryType 是一个枚举,其值与附件中的图像相同

LABiometryType is a enum with values as in attached image

您可以在Touch ID和FaceID之间检查设备支持的身份验证类型,或者不检查.

You can check which authentication type supported by device between Touch ID and FaceID or none.

Apple已为此枚举 LABiometryType 更新了值. 现在已不推荐使用.

Apple have updated values for this enum LABiometryType. none is deprecated now.

这篇关于如何以编程方式检查对"Face ID"和"Touch ID"的支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆