Could not build the application after change firebase_core from 0.4.4 to 0.5.2 on iOS Simulator

Viewed 1386

I changed firebase core deoendecies from 0.4.4 to 0.5.2. But if i try to build my project, following error generates:

/Users/mrcube72/DEV/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.5.2/ios/Classes/FLTFirebasePlugin.h:9:9: error: include of non-modular header inside framework module 'firebase_core.FLTFirebasePlugin': '/Users/??????/DEV/Projects/futapp/ios/Pods/Headers/Public/FirebaseCore/FirebaseCore.h' [-Werror,-Wnon-modular-include-in-framework-module]
    #import <FirebaseCore/FirebaseCore.h>
            ^
    1 error generated.
    /Users/??????/DEV/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.18.3/ios/Classes/FLTFirebaseAuthPlugin.m:5:9: fatal error: could not build module 'firebase_core'
    #import <firebase_core/FLTFirebasePluginRegistry.h>
     ~~~~~~~^
    2 errors generated.

What is the problem? How can i resolve this problem? I tried reinstall pods, etc... Thank for the answers...

1 Answers

So far the suggestions for solving this issue are two.

option 1:

  1. Adding firebase_analytics: ^6.0.0 to pubspec.yaml.
  2. Then removing Podfile and Podfile.lock.
  3. And finally running it again.

Option 2:

  1. Run Flutter clean,
  2. Exit IDE
  3. and open project and run again

Both of the above didn't work for me.

What I did instead was I created a new project altogether and run pod install and all the usual stuff needed to get your project up and running. That worked. So I then deleted the IOS folder of the project I'm having issues with and replaced it with that of the new one that worked. This solved my problem.

Hope one of the above solves it for you. If you find a way please share

All the best

Related