skip to Main Content

I’m new to flutter and I’ve received a "working Android" project which I should adapt to iOS, at least I need it to make it boot and such.

After some reading here and there and then some additional googling I’ve come with a version of the flutter app that Xcode 13 can compile and launch on the simulator without any problem, but once it runs then some kind of initialization process fails with this error:

MissingPluginException(No implementation found for method Firebase#initializeCore on channel plugins.flutter.io/firebase_core)

I read the words of the message, I understand what they say but I don’t understand what they mean.

I already did a flutter clean a flutter pub get then I went into the ios folder to do a pod install/update. Typically I delete Pods folder just in case (to have a even cleaner environment)…

The pubspec.yaml relevant lines I have are these:

name: xxxxxxxxxxxxxxxxxxxxxxx
description: A new Flutter project.

version: 1.0.0+1

environment:
  sdk: ">=2.12.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter


  cupertino_icons: ^1.0.2
  firebase_core: ^1.7.0
  firebase_crashlytics: "^2.2.3"
  airship_flutter: ^4.0.0
  pull_to_refresh: 2.0.0
  http: ^0.13.4

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_native_splash: ^0.2.8

flutter_native_splash:
  image: assets/splash.png
  android: true
  ios: true

flutter:
  uses-material-design: true

After doing pod install/update I also get this relevant info inside my Podfile.lock file:

Airship (14.4.2):
Airship/Automation (14.4.2):
Airship/Core (14.4.2)
Airship/ExtendedActions (14.4.2):
Airship/MessageCenter (14.4.2):
airship_flutter (4.4.0):
Firebase/CoreOnly (8.9.0):
Firebase/Crashlytics (8.9.0):
firebase_core (1.10.0):
firebase_crashlytics (2.3.0):
FirebaseCore (8.9.0):
FirebaseCoreDiagnostics (8.9.0):
FirebaseCrashlytics (8.9.0):
FirebaseInstallations (8.9.0):
Flutter (1.0.0)
GoogleDataTransport (9.1.2):
GoogleUtilities/Environment (7.6.0):
GoogleUtilities/Logger (7.6.0):
GoogleUtilities/UserDefaults (7.6.0):
nanopb (2.30908.0):
nanopb/decode (2.30908.0)
nanopb/encode (2.30908.0)
PromisesObjC (2.0.0)
airship_flutter (from `.symlinks/plugins/airship_flutter/ios`)
firebase_core (from `.symlinks/plugins/firebase_core/ios`)
firebase_crashlytics (from `.symlinks/plugins/firebase_crashlytics/ios`)
Flutter (from `Flutter`)

(I got this simplified version executing this command line: cat ios/Podfile.lock | grep " - " | grep "(" | grep -v " "

EDIT: I did some ‘flutter pub upgrade’ to raise my libraries versions a bit. The versions of the above list are the last ones I’m using.

EDIT: Here I add also some excerpt from my lib/main.dart file

...
import 'package:firebase_core/firebase_core.dart';

Future<void> main() async {
  // This is for Firebase
  WidgetsFlutterBinding.ensureInitialized();

  HttpOverrides.global = PolarStarHttpOverrides();

  // Launch app after splash
  runApp(MyApp());
}

class MyApp extends StatelessWidget {

  final Future<FirebaseApp> _fbApp = Firebase.initializeApp();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: FutureBuilder(
        future: _fbApp,
...

I’m not sure about what else to look for, Xcode builds ok, min SDK version is set to 11, the app builds, but it doesn’t go beyond some ugly banner on screen claiming "Something went WORNG" (sic)

This error appears in some other people’s Stack Overflow questions but for Android, and I’m using iOS. My coworker (using android) has no apparent problem whatsoever booting and running the flutter app.

I’ve read documentation here and there, but nothing has lead me to any relevant fix…

Is there some additional detail I might have overlooked?

EDIT: I’ve already tried many different cleaning approaches (as running "flutter clean" and some other similar commands for the "ios" subproject ) to no avail. I also tried some "flutter pub upgrade" (instead of ‘get’) in case some newer version libraries could appear (and some of them did, but to no avail again).

2

Answers


  1. Add firebase_core :any in pubspec.yaml, delete PodFile.lock Run flutter clean then flutter pub get. Then navigate to ios folder in terminal. Run pod install. Now you should be able to run it successfully.

    Login or Signup to reply.
  2. Remove podfile.lock,.symlinks, Pods
    Now "flutter pub get" & install pods using "pod install"
    after that just open XCode again..

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search