Every other build I keep getting 'FirebaseCore/FIRAnalyticsConfiguration.h' file not found. I keep going through the process of cleaning Pods folder and reinstalling node modules but this keeps happening.
ios/Podfile
:# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'boilerplate' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
# Pods for boilerplate
pod 'Branch'
pod 'Fabric'
pod 'Crashlytics'
pod 'FBSDKLoginKit'
pod 'libPusher', '1.6.1'
pod 'GoogleSignIn', '~> 4.2.0'
pod 'Analytics/Segmentio'
pod 'Firebase/Core', '~> 5.15.0'
pod 'Firebase/Messaging', '~> 5.15.0'
end
AppDelegate.m
://Standard RN
#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <React/RCTLinkingManager.h>
//REACT_NATIVE_BRANCH
#import <react-native-branch/RNBranch.h>
//REACT_NATIVE_FABRIC
#import <Fabric/Fabric.h>
#import <Crashlytics/Crashlytics.h>
//REACT_NATIVE_FIREBASE
#import <Firebase.h>
//REACT_NATIVE_NAVIGATION
#import <ReactNativeNavigation/ReactNativeNavigation.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import "RNGoogleSignin.h"
//Segment
#import "SEGAnalytics.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//REACT_NATIVE_BRANCH
//[RNBranch initSessionWithLaunchOptions:launchOptions isReferrable:YES]; // <-- add this
//REACT_NATIVE_FABRIC
// [Fabric with:@[[Crashlytics class]]];
//REACT_NATIVE_FUREBASE
[FIRApp configure];
[[UNUserNotificationCenter currentNotificationCenter] setDelegate:self];
BOOL debugMode = NO;
#ifdef DEBUG
debugMode = YES;
#endif
if (debugMode) {
[SEGAnalytics setupWithConfiguration:[SEGAnalyticsConfiguration configurationWithWriteKey:@"commentedout"]];
} else {
[SEGAnalytics setupWithConfiguration:[SEGAnalyticsConfiguration configurationWithWriteKey:@"CommentedOut"]];
}
NSURL *jsCodeLocation;
for (NSString* family in [UIFont familyNames])
{
NSLog(@"%@", family);
for (NSString* name in [UIFont fontNamesForFamilyName: family])
{
NSLog(@" %@", name);
}
}
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
//REACT_NATIVE_NAVIGATION
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor whiteColor];
[ReactNativeNavigation bootstrap:jsCodeLocation launchOptions:launchOptions];
return YES;
}
// Facebook/Google/Branch.io URL handling
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
//if ([RNBranch.branch application:application openURL:url sourceApplication:sourceApplication annotation:annotation]) {
// return YES;
// }
if ([RNGoogleSignin application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation
]) {
return YES;
}
if ([[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation
]) {
return YES;
}
return [RCTLinkingManager application:application openURL:url sourceApplication:sourceApplication annotation:annotation];
}
@end
ADD_SOMETHING_HERE
e.g. iOS 10 or Android API 28N/A
N/A
N/A
XCode Version 10.1
e.g. Xcode 10, Android Studio 3.2React Native
version:0.57.8
React Native Firebase
library version:5.2.1"
Firebase
module(s) you're using that has the issue:TypeScript
?N/A
ExpoKit
?ExpoKit
N/A
I also have this problem =/
TRy comment out your use_frameworks!
inside of your podfile
Did you add FirebaseCore/FirebaseCore.h to AppDelegate.m ? If not ,you have to add it or pod install again, if it does not work ,remove the app and install again.
Same here
Fixed by this - issues/1764#issuecomment-452178852
system("mkdir -p Pods/Headers/Public/FirebaseCore && cp Pods/FirebaseCore/Firebase/Core/Public/* Pods/Headers/Public/FirebaseCore/")
Hello 馃憢, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.
same issue
React Native - 0.59.8
Firebase - 6.2.0
xcode - 9.4.1
mac os - 10.13.2
These have a few general patterns.
If you just integrated, and you already have a Podfile, you should unlink react-native-firebase, move your Podfile aside, then relink and then move your Podfile back in place, as react-native-firebase should not be integrated via Pods at this time (that will change in the future but is the v5 recommendation)
Then either way, you will probably need this workaround in your Podfile for the underlying Firebase SDK pods (which should be in the Podfile): https://github.com/mikehardy/rnfbdemo/blob/master/Podfile#L92
same issue
React Native - 0.59.8
Firebase - 6.2.0
xcode - 9.4.1
mac os - 10.13.2
@nabeelItilite
my environment was very much like yours. And here was also returning Error. So after doing tests in many ways, this one here "rnfb-demo" was what solved.
As my project already existed, I needed to add Firebase to my environment. And Firebase is a huge library. My mission was to stabilize the versions of the components for the App to re-run. There have been many researches and new beginnings. It's been 5 days working.
To solve after many attempts I followed the @mikehardy tutorial that worked.
1) I started by doing a backup of the project (basically I duplicated the entire project folder and named it "project-copy-name".
2) delete the folders "ios", "android" and "node_modules"
3) I cleaned the caches:
killall 9 node && watchman watch-del-all && rm -rf $ TMPDIR / react- * && rm -rf $ TMPDIR / npm- * && rm -rf $ TMPDIR / haste- * && rm -rf $ TMPDIR / * && rm -rf ~ / Library / Developer / Xcode / DerivedData / Farmazon- *
4) I used the yarn install
command to import a new component folder" node_modules "
5) I also used the npm install
command, it sounds crazy, but until that happened to me.
6) I used the react-native eject
command to recreate the project folders (ios and android) so the projects came new from the factory, according to the versions that are in the package.json.
7) I used the react-native link
command to link the react libraries etc to native projects. (only this is not enough .. doing a build in this step will surely return red screen ... and still need to go back to the beginning and do the steps again.)
8) Now is the time to apply some updates on each of the iOS and Android projects, as I mentioned above that the "link" is not enough.
[@mikehardy] has developed a script that starts a new project, RN versions 59 and 60 so just run the script that an entire project is created and connected to the firebase. It works!
But as in my case I need to apply on my current project, so I did the steps that are in the script he built.
Here is the link to the script: [follow from line 20]
https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh
Here is the link to github:
https://github.com/mikehardy/rnfbdemo
The versions of my packages:
聽聽聽聽"react": "^ 16.8.3",
聽聽聽聽"react-native": "^ 0.59.10",
聽聽聽聽"react-native-firebase": "5.3.1",
聽聽聽聽"react-native-awesome-card-io": "^ 0.8.2", *
聽聽聽聽"react-native-vector-icons": "^ 6.3.0", *
react-native link
command to compile.ANDROID:
聽聽聽聽聽聽gradle: 5.4.1
聽聽聽聽聽聽buildToolsVersion = "28.0.3"
聽聽聽聽聽聽minSdkVersion = 16
聽聽聽聽聽聽compileSdkVersion = 28
聽聽聽聽聽聽targetSdkVersion = 28
聽聽聽聽聽聽supportLibVersion = "28.0.0"
聽聽聽聽聽"play-services-base: 16.1.0"
聽聽聽聽聽聽"firebase-core: 16.0.9"
iOS:
聽聽pod 'Firebase / Core', '~> 6.3.0'
9) I compiled the projects and they worked.
10) I reintroduced the icons, bundle-id, images, splash screen etc .. everything that was already in the project originally.
It sure is a great big mission.
Well now I'm going back there and finish the project, good luck to us.
Try remove the Podfile.lock file and Pods folder. Run 'pod install'. This working for me
These have a few general patterns.
If you just integrated, and you already have a Podfile, you should unlink react-native-firebase, move your Podfile aside, then relink and then move your Podfile back in place, as react-native-firebase should not be integrated via Pods at this time (that will change in the future but is the v5 recommendation)
Then either way, you will probably need this workaround in your Podfile for the underlying Firebase SDK pods (which _should_ be in the Podfile): https://github.com/mikehardy/rnfbdemo/blob/master/Podfile#L92
Hello @mikehardy , seems like the link is dead.
Yeah - this issue is super old @co-de :-), we've all moved on to RN60 or RN61 now, I forked off RN59 support in my demo and you can see the old version (with workaround I intended to link before) here: https://github.com/mikehardy/rnfbdemo/blob/master/PodfileRN59#L92
(also note that if you do move to RN60+ this problem is no longer happening for anyone, so there will be no root cause analysis as to why it's needed)
(also note that if you do move to RN60+ this problem is no longer happening for anyone, so there will be no root cause analysis as to why it's needed)
@mikehardy I am at react-native: 0.61.1 and still having this issue and can't find the reason. I am not very familiar with Pods and stuff and have been struggling with this for days. Any recommendations?
@co-de if you're not very familiar with pods and have been struggling for days then I apologize - as this is drastic - but I'd throw away the project and rebuild one (like from rnfbdemo.sh script above - but customized to at least start with the correct name), then swap your javascript stuff back in on top of it once you have a base that you know works. It took me quite some days to upgrade my own project from the pre-pods style to the RN0.60 pods+auto-link style and in the end I might have been better off just throwing it out and swapping the javascript back in on top of it as well.
All I can say is that from a clean RN60 project (and in mine on RN0.61.2 now, with pods) this does not reproduce, so I don't know.
Hi, i was facing this issue . But i have this fixed error now. Go to Pod file and add "pod 'Firebase/Core', :modular_header => true聽and "pod 'Firebase/Core', :modular_header => true
@mikehardy I really think your advise about starting a new project then adding dependencies then original projects JS should be an official RN way of upgrading to 0.60+ haha much much easier than trying to upgrade!
@rezasazesh well - I'd really consider it a last resort, it's easy to forget all the little tweaks made in Xcode projects since the project files are so opaque - but yeah, when confronted with a couple days of no progress, no harm in quickly trying something drastic. Glad you're project is working now, welcome to auto-linking and cocoapods - so much easier! :-)
TRy comment out your
use_frameworks!
inside of your podfile
thx god
i just comment use_frameworks and pod install again and it work!
TRy comment out your
use_frameworks!
inside of your podfilethx god
i just comment use_frameworks and pod install again and it work!
no problem, glad it worked
I cannot comment out use_frameworks!
, it is required for other pods.
Any other solution?
@roberto-buratti this issue was closed in February? I believe react-native-firebase v6+ work with frameworks? https://rnfirebase.io/#allow-ios-static-frameworks
For me, it was missing use_native_modules!
line in Podfile. I added it below test target and it works now.
Most helpful comment
@roberto-buratti this issue was closed in February? I believe react-native-firebase v6+ work with frameworks? https://rnfirebase.io/#allow-ios-static-frameworks