react-native compile error - 'Firebase.h' file not found with <angled> include; use "quotes" instead

Viewed 162

enter image description here I was trying to run ios app, getting firebase.h file error in pod, How do i overcome this issue. I have M1chip with below configurations :

   OS: macOS 12.3.1
   CPU: (8) arm64 Apple M1
   Memory: 2.50 GB / 16.00 GB
   Shell: 5.8 - /bin/zsh   Binaries:
   Node: 18.6.0 - /opt/homebrew/bin/node
   Yarn: 1.22.19 - /opt/homebrew/bin/yarn
   npm: 8.13.2 - /opt/homebrew/bin/npm
   Watchman: Not Found   Managers:
   CocoaPods: 1.11.3 - /opt/homebrew/bin/pod   SDKs:
   iOS SDK:
     Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
   Android SDK: Not Found   IDEs:
   Android Studio: Not Found
   Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild   Languages:
   Java: 1.8.0_302 - /usr/bin/javac
   Python: Not Found   npmPackages:
   @react-native-community/cli: Not Found
   react: 16.13.1 => 16.13.1 
   react-native: 0.63.3 => 0.63.3 
   react-native-macos: Not Found   npmGlobalPackages:
   *react-native*: Not Found
1 Answers

I got the solution. https://github.com/invertase/react-native-firebase/issues/1016

If you use CocoaPods, just add these lines to your Podfile:

 post_install do |installer|
    rnfirebase = installer.pods_project.targets.find { |target| target.name == 'RNFirebase' }
    rnfirebase.build_configurations.each do |config|
      config.build_settings['HEADER_SEARCH_PATHS'] = '$(inherited) ${PODS_ROOT}/Headers/Public/**'
    end
  end


Related