Search code examples
touch-id

Touch ID Passcode Fallback: Device Pin


I have an option for users to use Touch ID and saw that Screens by Edovia presents the device's pin entry view controller when the user enters the incorrect passcode or chooses to enter a passcode. I have searched the documentation and Google for a solid example or direction to take that would allow me to present the same pin-entry method, but I have come away empty-handed.

Does anyone have any idea of how I can access this screen?

1 2 3


Solution

  • It is available on iOS 9.0 and later.

    You can see changes for LocalAuthentication here.

    In LAPolicy, we have a new value:

    LAPolicyDeviceOwnerAuthentication NS_ENUM_AVAILABLE(10_11, 9_0) = kLAPolicyDeviceOwnerAuthentication
    

    You can see document for LAPolicyDeviceOwnerAuthentication in LAContext.h:

    Touch ID authentication dialog behaves similarly as the one used by LAPolicyDeviceOwnerAuthenticationWithBiometrics. However, instead of "Enter Password" button there is "Enter Passcode" button which, when tapped, switches the authentication method and allows users to enter device passcode. Passcode authentication will get locked after 6 unsuccessful attempts with progressively increased backoff delay.