Header file (FirebaseCore/FirebaseCore.h) not found, despite importing Firebase.framework

33,829

Solution 1

There were two problems:

1) The instructions stated on the Google Developer website for importing the frameworks manually, are somewhat lacklustre. So I followed the following tutorial to import the frameworks and setup my developer account: http://www.mokacoding.com/blog/setting-up-firebase-without-cocoapods/

2) After you have imported all the frameworks/resources/plist files/etc... you will still get the following build error:

'FirebaseCore/FirebaseCore.h' file not found

In order to get around this issue, clean your Xcode project and then close the project. Then reopen the project and rebuild it. It will now work - perhaps the Xcode project can now see the framework files or something... not really sure, but it's the only solution that has repeatedly worked for me.

Update

I think this was just a bug with Xcode 9.x, ever since I upgraded to Xcode 10, I haven't had this issue at all. Just import all the frameworks as usual and build and run the project.

Solution 2

Make sure you are opening the .xcworkspace file instead of the .xcodeproj file.

I was troubleshooting for at least an hour before I determined this was my mistake, so hopefully this answer will save you some time!

Solution 3

Please check on edit scheme -> build -> check if Find implicit Dependencies is enable. if no, enable it and rebuild.enter image description here

See the following for "edit scheme"

How to change the name of the active scheme in Xcode?

Solution 4

Try remove the Podfile.lock file and Pods folder.

Run pod install.

This worked for me.

Solution 5

For those who are still struggling with this and have tried removing caches and all those files which everyone is talking about.

Basically, those who've already followed these steps:

1.) rm -rf Pods .xcworkspace && rm Podfile.lock (removing Pods directory, xcworkspace, clearing cache, removing .locks)

2.) rm ~/Library/Developers/Xcode/DerivedData

3.) pod install

But still nothing is working for you and if you're still seeing error like:-

<FirebaseCore/FirebaseCore.h> file not found

then here's what I did:

you probably have the code written in earlier xcode versions or swift and now trying to run it in new Xcode version 12 or something, and so I changed this

#import <FirebaseCore/FirebaseCore.h>

to

#import "Firebase.h"

and that issue was resolved for me. I know that this is a change in Firebase.h which you probably are not looking for, but I am posting this here in case if someone just wants to pass that error.

Share:
33,829
Supertecnoboff
Author by

Supertecnoboff

I’m Daniel Sadjadian - Car enthusiast, computer programmer &amp; entrepreneur running my own business. I live life to the max and try my best to get the most out of each day. Every moment counts :)

Updated on December 29, 2021

Comments

  • Supertecnoboff
    Supertecnoboff over 2 years

    I am trying to manually import and use the Firebase framework in my iOS application. I am starting off with the basic bare minimum Analytics framework (then I'll add the rest of the frameworks).

    I followed this tutorial in order to manually import the Google Firebase framework into my Xcode project. The problem is that I am still getting the following error:

    'FirebaseCore/FirebaseCore.h' file not found

    I have imported the frameworks, imported the overall header file and have made sure that the files where actually copied to the project directory folder.

    I have set the -ObjC linker flag too.

    enter image description here

    Has anyone else managed to manually import the Google Firebase framework into their Xcode project? What am I missing?

    Note: I am not interested in using CocoaPods at all, I just want the simple old fashioned approach.