如何检测ios应用中启用的字母数字密码

问题描述 投票:0回答:1

我想检测我的设备以检查是否启用了字母数字密码。如果没有,我的应用程序将无法启动。我在下面进行了检查,但是它只能检测是否启用了密码。Programmatically detect whether iOS passcode is enabled or not

是否有任何api可以检测到此?谢谢。

ios security passcode
1个回答
0
投票

您可以使用LocalAuthentication来实现。


private func IsDeviceHasPasscode() -> Bool {
    return LAContext().canEvaluatePolicy(.DeviceOwnerAuthentication, error: nil)
  }

希望有帮助

© www.soinside.com 2019 - 2024. All rights reserved.