-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'FirebaseAnalytics/FirebaseAnalytics.h' file not found #1016
Comments
Do you use CocoaPods for Firebase/* and RNFirebase? |
Environment Packages: (wanted => installed) I'm having the same issue. I was able to get passed the Firebase.h by adding Firebase.h into but I'm still getting the second error. In
I installed it manually, I'm not using CocoaPods. Steps to reproduce:
|
Please take a look at option 2 of https://rnfirebase.io/docs/v4.0.x/installation/ios#1.3.-Install-Firebase-Library This explains that if you're not using cocoapods, you need to add the frameworks to an |
Thanks @chrisbianca I totally missed out on that. For anyone else trying to get this to work manually. The following steps worked for me.
Note: Here instead of following the readme inside the Firebase folder you downloaded follow the below steps.
Once you have done the above steps rebuild your app and it should be fine. |
@chrisbianca any idea why we're getting the same error even though we have always used Cocoapods? We started getting this error after the iOS SDK had their hiccup with 4.12.0. We now get this no matter what version we use.
|
Actually, I can't get it to work even if I do include+link the SDK in the ios directory. I followed the instructions shared by AndreiCalazans but no bueno. I don't have any idea what changed between it working and not working. I'm using version control and can't find any changes to the Podfile, Podfile.lock, etc... |
In my case, what was missing from @AndreiCalazans ' instructions to fix my problem was one more step at the end, just before building the project, that is: 12: In Xcode right click the project name folder, select Add files to “appName” and select the ios/Firebase folder. |
@AndreiCalazans, I am confused in this two files the module.modulemap file and Firebase.h, I am not able to see this in react-native-firebase sdk. |
@AndreiCalazans Thanks for your help! |
I wasn't able to do get what @loukandr suggests to work, but adding the Frameworks as individual files instead of the whole folder did work. Thanks to both @loukandr and @AndreiCalazans ! |
I have managed to followed @AndreiCalazans and @loukandr .. but after that i get a different error and it says "undefined symbols for architecture x86_64 react native" :( Anyone faced it and solved it before? I am using the following: "react-native": "^0.55.4", I am only using DynamicLink and Messaging. Following is the trace:
|
I set up using pod and it is working fine. So, maybe above comment is not valid anymore. Thanks guys! Followings are the steps I did in my project: react-native unlink react-native-firebase |
@AndreiCalazans your comment should be part of the doc ("without cocoapods" section) |
Thank you @AndreiCalazans @loukandr @kolohelios for saving my day! @JulienMalige suggestion for updating the docs for "without cocoapods" -parts would be really helpful for others like me not using Cocoapods. I am quite noob specially with iOS development and used react-native-firebase first with Android and now it took 2 days to get it working in iOS. Yesterday I tried to use Cocoapods but it broke some other libraries so today I started to install react-native-firebase without cocoapods. Some comments for my installation problems: For some reason my $(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase was broken. I might broke something myself but I did "react-native link react-native-firebase" on Windows environment. My url was using \ instead of / and xCode did not understand that at all when started to work on MAC with iOS. Then I noticed that when I updated project.pbxproj directly in editor it did not get updated to Xcode even with Xcode->Product->Clean, Xcode shutdown, Library->Developer->Xcode->DerivedData deletion. So I edited them again in Xcode. Maybe some cache problem still? For noobs like me @AndreiCalazans step 7 would need addition that the $(SRCROOT)/Firebase should be set recursive. And the step 8 would be good to point that you have to search "Framework Search Paths" so that the Build Settings "All" is selected. I had the Customized selected and it was not found. For the step 4: To help to find the Firebase SDK zip here is a link: https://firebase.google.com/docs/ios/setup And finally @loukandr great suggestion for adding the ios/Firebase folder did not help but the @kolohelios suggestion to add all frameworks separately did work! There was different kind of error messages I had before this was solved. Here are some I still remember:
|
For anyone who is still having trouble, I had to modify @AndreiCalazans step 6 and 7 (for step 7 I followed @henkkasoft).For step 6 instead of dragging the entire folder like the Analytics folder into the root/ios/firebase drag the contents within the folder, if your desired sdk file has a folder called RESOURCES drag the contents of that file too. As far as the executables if there is any they dont have to be added i think. I also had to restart xcode and android studio as the app kept crashing when opened. And thank you @AndreiCalazans |
HI Guys, i just ran into the same issue, and i read aggain the documentation from the Cocoapod, it says, that the pod for just Firebase needs to be added, then any sub module, so i leaved my configuration as follows and no more File not found exception or anything:
(Note, i don't know cocoapods, i come from maven world, but react-native happens and here i am :D, i think is better to set an specific version, and remember to run |
Removing pod 'Firebase/Messaging' and re-installing it solve the issue it seems for X-code - 10 |
There is one crucial step you've missed that I had to work through to get my build to pass. @ step 4) DO NOT DOWNLOAD THE IOS SDK THAT FIREBASE RECOMMENDS. You must check the supported versions table to make you iOS SDK version match with the react-native version you are using + the react-native-firebase version you have installed: https://github.com/invertase/react-native-firebase/tree/v5.x.x#supported-versions---react-native--firebase You can download the correct version from here: https://github.com/firebase/firebase-ios-sdk/releases/tag/5.20.2 |
If you use CocoaPods, just add these lines to your Podfile:
|
This worked for me. I'm guessing that firebase has nested folders and the non-recursive default by CP doesn't find the modulemaps? |
Issue: Cannot build the project
After updating
RNFirebase´and
Firebase` iOS SDK cannot build the project:'Firebase.h' file not found with <angled> include; use "quotes" instead
in RNFirebaseUtil.h'FirebaseAnalytics/FirebaseAnalytics.h' file not found
in Firebase.hIn file included from .../node_modules/react-native-firebase/ios/RNFirebase/admob/RNFirebaseAdMobRewardedVideo.m:2:
Environment
iOS 11.3
macOS High Sierra
Xcode 9.3
ReactNative 0.55.1
RNFirebase Version: 4.0.5
Firebase version:
Firebase 4.13.0
FirebaseAnalytics
FirebaseCore 4.0.20
The text was updated successfully, but these errors were encountered: