首页 > 解决方案 > 密码字段未显示在 localAuthenticationContext

问题描述

localAuthenticationContext.evaluatePolicy(.deviceOwnerAuthentication, localizedReason: reasonString) { success, error in
    // a popup is shown but there is no password option. Only cancel button
});

我想显示带有取消和密码选项的弹出窗口。假设设备密码已启用。

标签: iosswift

解决方案


你的要求是不可能的。您应该尝试至少 1 touchId 身份验证

请参阅https://developer.apple.com/documentation/localauthentication/lapolicy/deviceownerauthentication?changes=_2


推荐阅读