Commit e602426
committed
fix(auth,ios): allow firebase_auth to compile under APPLICATION_EXTENSION_API_ONLY
Fixes #18232.
Wraps the four call sites in FLTFirebaseAuthPlugin.m that reference
APIs unavailable to app extensions:
- -[FlutterPluginRegistrar addApplicationDelegate:] in
+registerWithRegistrar: (line 156)
- +[UIApplication sharedApplication].connectedScenes (lines 904, 914)
- +[[UIApplication sharedApplication] keyWindow] fallback (line 926)
The first is gated with #if !TARGET_OS_EXTENSION. The
presentationAnchorForAuthorizationController: method already had
TARGET_OS_OSX branching; this adds an extension branch that returns
nil. Sign-in flows that require a presentation anchor cannot run from
an extension context, so this method is not expected to be invoked
there.
Pre-extension behaviour is unchanged on iOS and macOS host targets.1 parent 7d1a8b1 commit e602426
1 file changed
Lines changed: 13 additions & 1 deletion
File tree
- packages/firebase_auth/firebase_auth/ios/firebase_auth/Sources/firebase_auth
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
156 | 161 | | |
| 162 | + | |
157 | 163 | | |
158 | 164 | | |
159 | 165 | | |
| |||
897 | 903 | | |
898 | 904 | | |
899 | 905 | | |
900 | | - | |
| 906 | + | |
901 | 907 | | |
902 | 908 | | |
903 | 909 | | |
| |||
924 | 930 | | |
925 | 931 | | |
926 | 932 | | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
927 | 939 | | |
928 | 940 | | |
929 | 941 | | |
| |||
0 commit comments