0

I've been struggling to get this project to build successfully in IOS Simulator.

I get the following cryptic errors:

While building module 'firebase_core' imported from
    /Users/shanejordan/Documents/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-2.5.2/ios/Classes/FLTSnapshotsInSyncStreamHan
    dler.m:6:
    In file included from <module-includes>:1:
    In file included from /Users/shanejordan/Repositories/HH/flutter_test_ios/ios/Pods/Target Support
    Files/firebase_core/firebase_core-umbrella.h:13:
    In file included from
    /Users/shanejordan/Documents/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.6.0/ios/Classes/FLTFirebaseCorePlugin.h:11:
    /Users/shanejordan/Documents/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.6.0/ios/Classes/FLTFirebasePlugin.h:9:9:
    error: include of non-modular header inside framework module 'firebase_core.FLTFirebasePlugin':
    '/Users/shanejordan/Repositories/HH/flutter_test_ios/ios/Pods/Headers/Public/FirebaseCore/FirebaseCore.h'
    [-Werror,-Wnon-modular-include-in-framework-module]
    #import <FirebaseCore/FirebaseCore.h>
            ^
    1 error generated.
    /Users/shanejordan/Documents/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-2.5.2/ios/Classes/FLTSnapshotsInSyncStreamHan
    dler.m:6:9: fatal error: could not build module 'firebase_core'
    #import <firebase_core/FLTFirebasePluginRegistry.h>

I created a fresh project and was able to run it in iOS fine, but as soon as I add the pub for firebase_core, i can't get it to run in IOS simulator. I must be missing something very basic.

I've tried all of the options in this answer doing all the tricks such as rebuilding podfiles, opening xcode and changing settings. Nothing has worked. Header file (FirebaseCore/FirebaseCore.h) not found, despite importing Firebase.framework

enter image description here

Shane
  • 4,185
  • 8
  • 47
  • 64

1 Answers1

0

Do these steps help you?

  1. Remove ios/Pods folder.

  2. Remove Podfile and Podfile.lock

  3. Remove pubspec.lock

  4. Open terminal and run these commands one after another

    pod cache clean —all

    flutter clean

    flutter pub get

    pod install

username
  • 126
  • 1
  • 6
  • i tried these steps, no success yet. I might need to find a repo that exist that has Firebase and then run that and compare the differences. – Shane Sep 15 '21 at 18:44