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:
yarn add react-native-firebase
react-native link react-native-firebase
pod update
after ensuring I was using Ruby 2.5.0The 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",
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.