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.