Determine if Touch Id requires passcode

Is there a way to determine if the device Touch Id has failed 4 times and requires the passcode? In my app in this scenario I would like to not use Touch Id and instead our app's standard login process. The canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics returns the same value as if Touch Id does not require the passcode.

Is there a way to determine if the device Touch Id has failed 4 times and requires the passcode?

In what context? At an API level you can specify an

LAPolicy
of
LAPolicyDeviceOwnerAuthenticationWithBiometrics
and that will only use biometrics, never the password password (in OS 9 you also have the option of
LAPolicyDeviceOwnerAuthentication
to also use the password). However, I suspect you're talking about some other context.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1@apple.com"

Thanks for the reply. Actually in my testing on iOS 8 if I am in another app and fail touch id four times the passcode prompt is displayed (in that app). If I do not enter the passcode and open my app, instead of the touch id prompt I get the passcode prompt. If I enter the passcode I then get the touch id prompt. If I hit cancel on the passcode prompt it returns a cancel that appears in the code as the same return as pressing cancel on the touch id prompt. I am calling canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics for touch id authentication.


I would like to know if there is a way to know if the passcode is required when calling canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics, in which case I would skip touch id auth and use our app id/pwd (and not system passcode)

I have experienced this issue as well and there appears to be no way to prevent the passcode from being shown.

Quinn,


I was noticing on the documentation for iOS LAContext that

LAPolicyDeviceOwnerAuthentication
is undocumented in fuction.
https://developer.apple.com/library/ios/documentation/LocalAuthentication/Reference/LAContext_Class/index.html#//apple_ref/occ/cl/LAContext


Additionally, by looking at the interface of LAContext in Xcode it seems to have grown beyond what has been documented in the API. The release notesshow that it should be available in iOS 9. Are these considered private APIs or can I use them?

Determine if Touch Id requires passcode
 
 
Q