Closed yashlinmaistry closed 5 years ago
My guess, if you're not using pods for the firebase dependencies (according to your template information here), is that you've added them correctly to debug target but not release. This should be reproducible without going all the way out to testflight, you should be able to see it fail on a simulator (or connected device) if you build and run release target on it
Note that cocoapods is recommended - https://rnfirebase.io/docs/v5.x.x/installation/ios#Option-1:-Cocoapods-(Recommended) / and what I demo here: https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh + https://github.com/mikehardy/rnfbdemo/blob/master/make-demo-rn59.sh because it makes a lot less guesswork.
I have no idea what could have gone wrong with the install as I've only followed the recommended install path, basically
You mention that you used the '5.4.1 Firebase Starter' project. What is that? Do you mean this one (currently at 5.4.0?) https://github.com/invertase/react-native-firebase-starter/blob/master/package.json#L3 - if so, it uses pods https://github.com/invertase/react-native-firebase-starter#3-ios-install-pods-rn--0600 so the template here for troubleshooting is incorrect and your Podfile isn't included. Maybe it was a pod install fail? (could pod deintegrate / pod integrate then) or something else
Hey Mike,
My mistake, we do use cocoapods for Firebase. Other libraries are manually linked.
Going through the pod file, I found I had all optional Firebase pods included except for Firebase Analytics. After I added it the app works :)
Thanks for the help!
My app also go rejected with the same error EXC_CRASH (SIGABRT). I checked my pod file and the firebase analytics was there
pod 'Firebase/Analytics'
Any other way to solve this
Issue
I've recently added RNFirebase to our React Native app. We used the 5.4.1 Firebase Starter project The app works fine in debug mode but not when we move it to test flight
The packaged APK file works perfectly on Android.
It looks like the app crashes because of a Firebase Analytics issue but not sure how to solve it. This is the symbolicated trace of the crashed thread
-[FIROptions isMeasurementEnabled] (in App) (FIROptions.m:387)
These are the crash logs from the app.
Project Files
iOS
Click To Expand
#### `ios/Podfile`: - [x] I'm not using Pods - [] I'm using Pods and my Podfile looks like: ```ruby # N/A ``` #### `AppDelegate.m`: ```objc /** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #import "AppDelegate.h" #import
#import
#import
#import
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[FIRApp configure];
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"RNFirebaseStarter"
initialProperties:nil];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
return YES;
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}
@end
```
Environment
Click To Expand
**`react-native info` output:** ``` OS: macOS High Sierra 10.13.6 CPU: (4) x64 Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz Memory: 165.24 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 8.11.3 - /usr/local/bin/node npm: 6.4.1 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1 IDEs: Android Studio: 3.4 AI-183.6156.11.34.5692245 Xcode: 10.1/10B61 - /usr/bin/xcodebuild npmPackages: react: ^16.8.6 => 16.8.6 react-native: ^0.60.5 => 0.60.5 npmGlobalPackages: create-react-native-app: 1.0.0 react-native-cli: 2.0.1 ``` - **Platform that you're experiencing the issue on**: - [x ] iOS - [ ] Android - [ ] **iOS** but have not tested behavior on Android - [ ] **Android** but have not tested behavior on iOS - [ ] Both - **`react-native-firebase` version you're using that has this issue:** - `5.5.6` - **`Firebase` module(s) you're using that has the issue:** - `Analytics` - **Are you using `TypeScript`?** - `N`
Think
react-native-firebase
is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]React Native Firebase
andInvertase
on Twitter for updates on the library.