Biometrics error LAError NotInteractive(-1004)

We have been using the LAContext's evaluation policy for the past couple of years without any major issues. However, since last week (September 26), we have seen a spike in error events, indicating:

json Copy code { "NSDebugDescription": "Caller is not running foreground.", "NSLocalizedDescription": "User interaction required." } We haven't made any code changes in the last couple of months. Is there any update regarding local authentication from Apple's side?

The most common cause of this error is… well… exactly what the error says: You’re calling LA from the background. It’s easy for any reasonably complicated app app to end up running in the background. If some convoluted code path leads to some LA code, you end up with this error.

A first step in investigating this is to check whether your app is in the foreground or the background. If it’s in the background, look up the call stack to see how it got to your LA code in that state.

Can you reproduce this easily? Or are you investigating this based on reports coming in from the field?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Biometrics error LAError NotInteractive(-1004)
 
 
Q