Error: RNFirebase core module was not found natively on iOS

user8951490 picture user8951490 · Mar 22, 2018 · Viewed 8.3k times · Source

I created a new app and I am trying to use react-native-firebase. But I continually get this error:

RNFirebase core module was not found natively on iOS, ensure you have correctly included the RNFirebase pod in your projects 'Podfile' and have run 'pod install'.

See http://invertase.link/ios for the ios setup guide.

Steps that I have done:

  1. yarn add react-native-firebase

  2. react-native link react-native-firebase

  3. Set up my .plist file from Google under .../myproject/ios/myproject
  4. Ran pod updateafter ensuring I was using Ruby 2.5.0
  5. Ran pod install

The pod file that I am currently using is:

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

target 'MyProject' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!
    pod 'Firebase/Core'
    pod 'Firebase/Database'
    pod 'Firebase/Messaging'

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

end

These are the versions that I am using:

"react": "^16.3.0-alpha.1",
"react-native": "0.54.2",
"react-native-firebase": "^3.3.1",

Answer

ehacinom picture ehacinom · Oct 29, 2018

If you don't want to manually link, you can try installing RNFirebase as a pod install directly:

pod 'RNFirebase', :path => 'path/to/node_modules/react-native-firebase/ios'

Changing or hardcoding HEADER_SEARCH_PATHS did not help me. When the error recurs, it's not necessary to rm -rf node_modules nor delete the pod file etc, I found it useful to clear the cache.