Ionic 4 xcode firebase.h not found

hi,
when i run ionic 4 project show error

Screenshot_3

IN case you havenā€™t fixed it, try this solution https://stackoverflow.com/questions/57218066/build-failed-xcode-10-cordova-firebase-project

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

WHAT TO DO

  1. Add ā€œpod ā€˜Firebase/Messagingā€™ā€ into platforms/ios/Podfile:

    platform :ios, ā€˜10.0ā€™

    target ā€˜Hire Rubyā€™ do
    project ā€˜Hire Ruby.xcodeprojā€™
    pod ā€˜Firebase/Messagingā€™
    end

  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

Hello,
Iā€™m using ionic 5 and Iā€™m getting the same error when adding capacitor firebase-crashlytics https://ionicframework.com/docs/native/firebase-crashlytics .

I tried all suggestions but nothing worked.

2 Likes

hi,
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