0
votes

I have a react native project and I want to use react native firebase, I just follow all the installation Docs to set up it in IOS, but in every time I build the project I got this error

'RNFirebaseUtil.h' file not found

in this path

/Volumes/App/node_modules/react-native-firebase/ios/RNFirebase/functions/RNFirebaseFunctions.m

in XCode

Path

So how can I solve this issue?

 "dependencies": {
    "firebase-admin": "^8.1.0",
    "firebase-functions": "^3.0.1",
    "react": "16.8.6",
    "react-native": "0.59.8",
    "react-native-firebase": "5.3.1",
  }

Podfile

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'App' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for App
    pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'

# Required by RNFirebase
  pod 'Firebase/Core', '~> 6.5.0'

# # [OPTIONAL PODS] - comment out pods for firebase products you won't be using.

  pod 'Firebase/Auth', '~> 6.5.0'
  pod 'Firebase/Database', '~> 6.5.0'
  pod 'Firebase/Functions', '~> 6.5.0'
  pod 'Firebase/Storage', '~> 6.5.0'


  target 'AppTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

target 'App-tvOS' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for App-tvOS

  target 'App-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

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/Headers/Public/**'
  end
end

end
2
do you run pod install ?Maleking
@Maleking yeah sureOliver D

2 Answers

0
votes

Looks like you have some version mismatch. If you are using react-native-firebase 5.3.1 (from package.json) then you should look here for the ios SDK version:

https://rnfirebase.io/docs/v5.x.x/releases/v5.3.x#iOS---Update-Firebase-SDKs

Also there is a mismatch with 5.3.1 rnf and .59.8 rn. You should be using 5.5.x rnf for that rn version. See Here:

https://rnfirebase.io/docs/v5.x.x/getting-started#Supported-versions---React-Native-/-Firebase

Make sure to also upgrade your SDK also if you are upgrading react-native-firebase from 5.3.x to 5.5.x. So you would then update your pod via here:

https://rnfirebase.io/docs/v5.x.x/releases/v5.5.x#iOS---Update-Firebase-SDKs

0
votes

What worked for me was,

  • 1.running npm uninstall on all the firebase packages and then reinstalling them
  • 2.running 'pod update' in the ios folder,
    1. cleaning the xcode build folder by holding down command + option + shift + k,
    1. build project again.