I am developing a Flutter iOS application and encountering a crash when using biometric authentication (Face ID) via the local_auth plugin.
■ Environment
- Flutter: 3.x
- local_auth: 2.2.0 (also tested with 2.1.6)
- iOS: real device (Face ID is working normally for device unlock)
- Firebase Authentication (email/password)
- Xcode build
■ Issue When calling biometric authentication, the app crashes immediately.
Code: final didAuthenticate = await auth.authenticate( localizedReason: 'Authenticate to login', options: const AuthenticationOptions( biometricOnly: false, useErrorDialogs: false, ), );
■ Error
- Thread 1: signal SIGABRT
- Crash occurs in libsystem_kernel.dylib (__pthread_kill)
- Happens immediately when authenticate() is called
- No exception is caught in Dart (native crash)
■ Verified
- NSFaceIDUsageDescription is correctly included in Info.plist
- Confirmed it exists in the built Runner.app Info.plist
- localizedReason is non-empty and in English
- Flutter clean / pod install executed
- App reinstalled on device
- Face ID works normally outside the app
■ Question
- Under what conditions does LAContext.evaluatePolicy trigger SIGABRT instead of returning an error?
- Are there known issues with presenting biometric authentication UI in certain UI states (e.g., view controller hierarchy, scene lifecycle)?
- Could this be related to UIScene / rootViewController issues?
- What is the correct timing and context to call biometric authentication safely in iOS apps?
I suspect this is related to native iOS behavior rather than Flutter logic.
Any guidance would be appreciated.