I have followed the installation guide exactly. I got Android configured but iOS is being more temperamental. When I attempt to build it in XCode I get the following error inside the RNFirebase
Xcode project.
<RN project root>/node_modules/react-native-firebase/ios/RNFirebase/RNFirebase.m:2:9:
'FirebaseCore/FirebaseCore.h' file not found
The one deviation I made was to use the Integrate without CocoaPods procedure which involves manually linking the Frameworks to your XCode project so I followed the Firebase readme to link the proper framework packages. That solved my initial error of the Firebase.h header file not being found by my AppDelegate file but now I just need to get past this error of the actual RNFirebase XCode project not seeing the framework.
I tried rerunning the react-native link command
but that yielded no fruit and it seems like it would be bad for me to manually go in and link it.
So how do I get the RNFirebase project to see the framework files? The #import <FirebaseCore/FirebaseCore.h>
statement is causing the issue.
@adamfisher This might be an oversight on our part - the support for standalone frameworks has been merged but not released, even though the docs have been updated.
Could you try installing from the latest version and seeing if that works:
npm install --save https://github.com/invertase/react-native-firebase
I ran the following commands but I still get the same error during build in XCode. I made sure to do a clean and then complete rebuild.
6000760mac:MobileApp user1$ yarn add https://github.com/invertase/react-native-firebase
yarn add v1.0.2
[1/4] ๐ Resolving packages...
[2/4] ๐ Fetching packages...
[3/4] ๐ Linking dependencies...
warning "[email protected]" has incorrect peer dependency "fbjs@*".
warning "[email protected]" has incorrect peer dependency "babel-core@^6.0.0 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0".
[4/4] ๐ Building fresh packages...
success Saved 1 new dependency.
โโ [email protected]
โจ Done in 4.75s.
6000760mac:MobileApp user1$ react-native link react-native-firebase
Scanning folders for symlinks in <RN Project Root>/node_modules (7ms)
rnpm-install info Android module react-native-firebase is already linked
rnpm-install info iOS module react-native-firebase is already linked
rnpm-install info Linking assets to ios project
rnpm-install info Linking assets to android project
rnpm-install info Assets have been successfully linked to your project
Which directory have you added your frameworks to?
They are in the root of the ios folder that React Native creates.
Try popping them in a Firebase folder as explained in the docs: https://rnfirebase.io/docs/v3.1.*/installation/ios#4.-Setup-Firebase-Pods
๐คฆโโ๏ธ Oh man that was easy. Thank you so much! creating a Firebase
folder at the root of the ios folder and adding them into there did the trick! Thank you.
No problem, glad it worked!!
Still getting this error.
By placing the frameworks within a Firebase folder at the root of the ios folder you mean this conf?
I'm having the same issue.
@chrisbianca your fix is not possible for people with npm 5 since npm 5 break post_install script making the install from source not possible.
When do you guys plan on releasing the new build?
I don't understand, the doc is for version 3.1 and npm originally builds 3.1, why should we build from master?
It should work properly with 3.1?
If so same question as @BricePissard above.
Creating a firebase folder with the librairies and adding the folder to the project doesn't work.
@tirrorex which fix?
@chrisbianca gonna open my own issue
I have the same issue what should I do please suggest.
we are experiencing the same issue
tried integrating using:
pod "Firebase/Core"
as described here: https://rnfirebase.io/docs/v3.1.*/installation/ios#4.-Setup-Firebase-Pods
but the problem wasn't solved
anybody managed to solve this issue?
Solved.
Using:
"react": "^16.2.0",
"react-native": "^0.51.0",
"react-native-firebase": "^3.2.2",
My podfile is using:
platform :ios, '9.3'
One of these commands help fix the 'FirebaseCore.h' not found.
cd ios
pod outdated
pod update
pod install
i have configured firebase for my react-native app "only for android part" it works really cool, But when i run my project to get the new build the Xcode throws some issues while building the app "though i haven't configured firebase for ios part"
please find the attachments
@policz
Hello, I am facing the same issue. Do you get any solution?
Inside RNFirebaseUtil.h file , 'Firebase.h' file not found error occur.
Anybody knows how to solve this problem? Thanks..
i am also facing same issue 'FirebaseCore/FirebaseCore.h' file not found
In my experience deleting the Pods directory and Porfile.lock, then running 'pod install' again will fix this issue. But I don't know why it appears in the first place and how to permanently resolve it.
Did anyone find solution? Facing the same issue
I eventually did. I gave up on Cocoapods installation after the problem kept coming back, and just included Firebase manually (look at the Firebase installation guide). After that no more issues.
Thanks @r00li!
Actually I was just able to solve it (finally) by removing the use_frameworks
from the pod file, while using a 1.5+ version of cocoa pods, and adding the , :modular_headers => true
for specific pods which depends on Obj-C code.
More info can be found here:
http://blog.cocoapods.org/CocoaPods-1.5.0/
Solved
Install pod 'FirebaseCore' instead of pod 'Firebase/Core'
@bhavneet0812
I think your solution is not working. RNFirebase Version v5.x.x
In my case, from toolbar, click File -> Save As Workspace, then close the project and open the .xcworkspace file. This will include missing files from relative paths to the workspace
I'm getting the same error only in CI no matter what pod version I used. Tried: 4.11/4.13/latest ver still same.
pod 'Firebase/Core'
pod 'Firebase/Messaging'
/Users/vagrant/git/node_modules/react-native-firebase/ios/RNFirebase/RNFirebaseUtil.h:6:9: 'Firebase.h' file not found
Update:
Did pod deintegrate
and pod install
managed to solve my problem
I eventually did. I gave up on Cocoapods installation after the problem kept coming back, and just included Firebase manually (look at the Firebase installation guide). After that no more issues.
I did the same, but the issue is still there. I've read the installation guide(many times).
I had a pod configuration for other dependencies, but I removed the Pod settings. Maybe Im missing something.
Any place to look at? or configuration I might be doing wrong?
Having the same problem while installing it manually.
@tenchoklang You don't need to add the header file "Firebase.h" to Link Binary With Libraries, you should even remove it from there. But if your followed the manual installation steps you had been thru this steps:
react-native link react-native-firebase
I don't know the reason you choose to do it manually, personally I'm not fan of use cocoapods, but I admit it has lots of benefits, so if you don't want to get a headache as me 3 days ago, you should use pods.
I was told not to use cocoapods at work. I was able to SOLVE the issue by following the steps here HERE
Most helpful comment
I have the same issue what should I do please suggest.