Ionic 4 xcode firebase.h not found

when i run ionic 4 project show error


IN case you haven’t fixed it, try this solution

It took me some serious time to figure this out.

Error: ‘firebase.h’ file not found

And also these errors if you encounter them:

  • The sandbox is not in sync with the Podfile.lock…
  • ‘Cordova/CDV.h’ file not found


  1. Add “pod ‘Firebase/Messaging’” into platforms/ios/Podfile:

    platform :ios, ‘10.0’

    target ‘Hire Ruby’ do
    project ‘Hire Ruby.xcodeproj’
    pod ‘Firebase/Messaging’

  2. Run pod install:

    cd platforms/ios
    pod install

  3. In XCode, select TARGET. In the select box select PROJECT. Then select the Info tab. In there, change Configurations to this:

Debug -> Your Project Name -> build
Debug -> Your Project Name -> build -> None
Release -> Your Project Name -> build
Release -> Your Project Name -> build -> None

Notice, one should be “build” and the other one (the one below) should be “None”.

WHY TO DO THAT (got this from the Internet somewhere…)

After changing target name

My problem was xcconfig with old target names.

  • Went to project file -> info -> configuration
  • Removed old xcconfig (both Debug & Release)
  • pod install
    It would update to new ones.

Also if you had missing .h files that’s the reason (pods header search path is in these xcconfig)

Choosing None worked for me as well. I was struggling with this for a day trying to integrate the Gimbal2 SDK into an Ionic4 project.

Hello @michalby Did you find any solution? I was struggling for a few days also. I cant build ios. It seems we both didn’t find a working solution for this.

1 Like

@harveyelsisura Try the steps I mentioned above. It did work for me.

If it does not work for you, try to update Cordova cli. It solved some other error for me as well.

Good luck.

1 Like

I’m using ionic 5 and I’m getting the same error when adding capacitor firebase-crashlytics .

I tried all suggestions but nothing worked.


I am also facing the same issue with capacitor 3 and ionic 5. Have u got any luck on this issue ?

Closing this now since it’s a relatively old post. Please open a new topic if you are still facing this issue