You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AuthPickerView sheet loses AuthService environment on Mac Catalyst #1397
Configure authService with Apple and Google providers, attach the hosting controller to a window, then set authService.isPresented = true.
Our hosted XCTest reproduces a fatal error on Catalyst while presenting the sheet:
No Observable object of type AuthService found.
A View.environmentObject(_:) for AuthService may be missing as an ancestor of this view.
The same stock-picker presentation test passes on iOS Simulator. The Catalyst failure also reproduces with a plain SwiftUI sheet containing an @Environment(AuthService.self) reader, suggesting a sheet environment propagation problem rather than provider configuration. Waiting until the presenting content is rendered did not avoid the crash.
Proposed fix
Explicitly inject .environment(authService) into AuthPickerView's primary sheet content, after .mfaHandler(). The nested legacy recovery sheet already injects it explicitly.
Both a temporary prototype and the actual patched package passed presentation, dismissal, and simulated successful-authentication handling on iOS Simulator and Catalyst. The consuming app ran six focused hosted tests per platform with zero failures. Real Apple/Google OAuth and the FirebaseUI repository's full test suites were not exercised. I am submitting the corresponding patch.
Activity
demolaf commentedon Sep 18, 2026
Hi @MatthewCallery thanks for raising the issue. I can see you've created a PR for this, I'll review that now.
iOS: pin FirebaseUI to the fix for the picker crashing on a Mac (#91)