LAErrorTouchIDLockout iOS 9/10

I am using LAContext from the Local Authentication framework to determine whether Touch ID is available, handling the various error codes from LAContext canEvaluatePolicy:error: method (passing LAPolicyDeviceOwnerAuthenticationWithBiometrics as the policy).


Everything works as expected but I have noticed that if the user has entered their device passcode too many times (thus blocking Touch ID), the LAErrorTouchIDLockout error is not always returned.


In iOS 10, if the user is blocked out of Touch ID, LAErrorTouchIDLockout is returned as an error from canEvaluatePolicy as expected.


In iOS 9, if the user is blocked out of Touch ID, canEvaluatePolicy does not return any error, but simply returns YES.


I cannot find any documentation about this, as according to Apple docs LAErrorTouchIDLockout has been available since iOS 9+.

https://developer.apple.com/reference/localauthentication/laerror/laerrortouchidlockout


Any idea about why I'm seeing this difference in behaviour?


Thanks.

Replies

Any idea about why I'm seeing this difference in behaviour?

Let me see if I understand the issue. To summarise:

  • You get the correct behaviour in iOS 10.

  • You get ‘broken’ behaviour in iOS 9.

Is that right? If so, it sounds like a straightforward case of Apple fixing a bug.

Share and Enjoy

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

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

Thanks. It seemed like a bug to me too, but it was so glaring I assumed it must have been a matter of me misunderstanding how canEvaluatePolicy:error works in iOS 9! I'll file a bug report. Thanks again.

I'll file a bug report.

There’s not much point filing a bug against iOS 9 if the problem is fixed in iOS 10. Apple is unlikely to ship any more fixes of this nature for iOS 9.

Share and Enjoy

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

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

Yes, sorry, I realized that made no sense and didn't bother filing anything. Maybe should have edited my post, hehe. Thanks.