xcode – Flutter – Firebase iOS App: Construct error: Module ‘firebase_core’ not discovered


I am making a Flutter App with Firebase because the backend (I’ve setup each connections from Android and iOS to Firebase already).
I can construct and run my app on each Android Emulator and actual Android system, no downside.
However when I attempt to run my app on an iOS Simulator (have not tried actual iPhone but), construct fails within the file GeneratedPluginRegistrant.h with this error: Module 'firebase_core' not discovered.

Content material of the file GeneratedPluginRegistrant.h:
(if I remark out the road @import cloud_firestore;, it can simply throw the identical error on the subsequent such @import)

//  Generated file. Don't edit.

// clang-format off

#import "GeneratedPluginRegistrant.h"

#if __has_include(<cloud_firestore/FLTFirebaseFirestorePlugin.h>)
#import <cloud_firestore/FLTFirebaseFirestorePlugin.h>
@import cloud_firestore;

#if __has_include(<firebase_auth/FLTFirebaseAuthPlugin.h>)
#import <firebase_auth/FLTFirebaseAuthPlugin.h>
@import firebase_auth;

#if __has_include(<firebase_core/FLTFirebaseCorePlugin.h>)
#import <firebase_core/FLTFirebaseCorePlugin.h>
@import firebase_core;

#if __has_include(<flutter_tts/FlutterTtsPlugin.h>)
#import <flutter_tts/FlutterTtsPlugin.h>
@import flutter_tts;

#if __has_include(<shared_preferences_ios/FLTSharedPreferencesPlugin.h>)
#import <shared_preferences_ios/FLTSharedPreferencesPlugin.h>
@import shared_preferences_ios;

@implementation GeneratedPluginRegistrant

+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
  [FLTFirebaseFirestorePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseFirestorePlugin"]];
  [FLTFirebaseAuthPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseAuthPlugin"]];
  [FLTFirebaseCorePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseCorePlugin"]];
  [FlutterTtsPlugin registerWithRegistrar:[registry registrarForPlugin:@"FlutterTtsPlugin"]];
  [FLTSharedPreferencesPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTSharedPreferencesPlugin"]];


I not too long ago opened this flutter mission for the primary time in months, so I needed to replace quite a lot of issues. I’ve up to date all dependencies in pubspec.yaml, upgraded from Flutter 2.?.? to Flutter 3.3.8 and so forth.
One necessary factor to say is that Firebase now suggests you so as to add the dependencies to the iOS app by way of the Swift Bundle Supervisor (SPM), as an alternative of pasting code into your Podfile. Might this be the supply of the issue?

That is the content material of my AppDelegate.swift:

import UIKit
import Flutter
import FirebaseCore //firebase

@objc class AppDelegate: FlutterAppDelegate {
  override func software(
    _ software: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    GeneratedPluginRegistrant.register(with: self)
    FirebaseApp.configure() //firebase
    return tremendous.software(software, didFinishLaunchingWithOptions: launchOptions)

I do not know what different data so as to add that will help you perceive the place the issue is likely to be. When you assume I ought to add one thing, please inform me.


Please enter your comment!
Please enter your name here