macOS 27 beta: LocalAuthenticationView causes LAContext policy evaluation to fail with LAErrorDomain -1007

I’m seeing a regression in macOS 27 beta when using SwiftUI LocalAuthenticationView.

When an LAContext is attached to LocalAuthenticationView, subsequent policy evaluation fails immediately with:

Error Domain=com.apple.LocalAuthentication Code=-1007
NSDebugDescription="Caller is not Apple signed."
NSLocalizedDescription="Authentication denied."

The same policies work when evaluated on a plain LAContext that has not been attached to LocalAuthenticationView.

Minimal shape of the failing path:

@State private var context = LAContext()

LocalAuthenticationView(context: context) {
    EmptyView()
}

context.evaluatePolicy(.deviceOwnerAuthenticationWithBiometrics,
                       localizedReason: "Unlock") { success, error in
    print(success, error as Any)
}

This affects Touch ID unlock in our macOS app. We currently work around it by detecting LAErrorDomain / -1007, removing LocalAuthenticationView, and asking the user to manually start Touch ID with a fresh LAContext.

Filed as Feedback: FB23262713

Could someone from the beta / LocalAuthentication team confirm whether this is an intended restriction for LocalAuthenticationView, or a macOS 27 beta regression?

Answered by DTS Engineer in 895418022
Filed as Feedback: FB23262713

Thanks. I think that’s the best path for this.

Share and Enjoy

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

Filed as Feedback: FB23262713

Thanks. I think that’s the best path for this.

Share and Enjoy

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

macOS 27 beta: LocalAuthenticationView causes LAContext policy evaluation to fail with LAErrorDomain -1007
 
 
Q