Flutter with direct dart firebase initialization still gets error on real device: Could not locate configuration file: 'GoogleService-Info.plist'
186
Looks like this is a known issue: https://github.com/FirebaseExtended/flutterfire/issues/7983
Need to keep an eye out for a solution....
Author by
sstakoff
Updated on January 03, 2023Comments
-
sstakoff over 1 year
Flutter 2.8.1 using flutterfire - according to docs, should not need use the GoogleService-Info.plist file. This version states that it support direct dart initialization. Works fine on simulator, but when running on real iOS device - from Android Studio or XCode, I get the error about the plist file. flutterfire configure creates a valid firebase_options.dart file and main looks like this:
void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, ); runApp(const MyApp()); }
Output of flutter doctor:
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.8.1, on macOS 12.0.1 21A559 darwin-x64, locale en-US) [!] Android toolchain - develop for Android devices (Android SDK version 28.0.3) ✗ cmdline-tools component is missing Run `path/to/sdkmanager --install "cmdline-tools;latest"` See https://developer.android.com/studio/command-line for more details. ✗ Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/macos#android-setup for more details. [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2020.3) [✓] VS Code (version 1.63.2) [✓] Connected device (3 available)
-
Krishna Shetty about 2 yearsHave you found any workaround for this issue? so Dart only initialisation doesn't work for iOS? I just did this - firebase.flutter.dev/docs/manual-installation#ios My firebase initialization fails because it can't find GoogleServices-info.plist file. Any hints to fix?
-
-
sstakoff about 2 yearsI have NOT done this. I know that in the past this was a required step, but according to the flutterfire docs here: firebase.flutter.dev/docs/overview#initializing-flutterfire this step is no longer needed as the framework now supports direct dart initialization. As I mention above, the direct dart initialization does work in the simulator. I am able to connect to the firebase database, perform authentication activities, etc. All this without the plist file. But it does not work on a real device
-
liam spiegel about 2 yearsThen i don't know
-
sstakoff about 2 yearsNo problem -- appreciate that you tried!
-
Anthony Castelli about 2 yearsI have also run into this same issue. Running it on a real device fails, but running it in the simulator works just fine. If you do happen to figure this out, let me know.
-
liam spiegel about 2 yearsi will help you but i need more information, i know it has something to do with flutterfire but thats all i know. So please can you post more information like the whole error that comes when you run it on a real phone.
-
Mr Random almost 2 years@sstakoff I am also facing the same issue on real device, did you fixed it