6

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)
1
  • Have 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? Commented Feb 26, 2022 at 2:24

2 Answers 2

1

Looks like this is a known issue: https://github.com/FirebaseExtended/flutterfire/issues/7983

Need to keep an eye out for a solution....

Sign up to request clarification or add additional context in comments.

Comments

0

Do you have add the GoogleServices-info.plist file in XCode?

I mean do you have drag and drop it from Finder to Android Studio or XCode.

You need to drag and drop it to XCode.

7 Comments

I 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
Then i don't know
No problem -- appreciate that you tried!
I 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.
i 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.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.