React-native-firebase: iOS not send data to Firebase Analytics

Created on 26 Oct 2018  路  4Comments  路  Source: invertase/react-native-firebase

Issue

I want to send data to firebase analytics and I set what is necessary in XCode to be able to see that data while I am in debug mode, but nothing is being sent to firebase in iOS. I have already configured these two arguments in Xcode --> Scheme --> Arguments Passed On Launch --> FIRDebugEnabled and FIRAnalyticsDebugEnabled, as well as the IS_ANALYTICS_ENABLED property in GoogleService-Info.plist is enabled.


Project Files

Podfile:

iOS

ios/Podfile:

  • [ ] I'm not using Pods
  • [x] I'm using Pods and my Podfile looks like:
pod 'Firebase/Core', '~> 4.13.0'
pod 'Firebase/Messaging'

AppDelegate.m:

#import <Firebase.h>
....
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[FIRApp configure];
 [[UNUserNotificationCenter currentNotificationCenter] setDelegate:self];
.....

Environment

  • 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

  • If known, the version of the platform are you experiencing the issue on:

    • iOS 12

  • Operating System:

    • [x] MacOS, version: N/A

    • [ ] Windows, version: N/A

    • [ ] Other, please specify: N/A

  • Build Tools:

    • XCode 10

  • React Native version:

    • 0.50.3

  • React Native Firebase library version:

    • 3.3.1

  • Firebase module(s) you're using that has the issue:

    • [ ] Authentication

    • [x] Analytics

    • [ ] Cloud Firestore

    • [ ] Cloud Messaging (FCM)

    • [ ] Crashlytics

    • [ ] Dynamic Links

    • [ ] Functions Callable

    • [ ] Invites

    • [ ] Instance ID

    • [ ] Notifications

    • [ ] Performance Monitoring

    • [ ] Realtime Database

    • [ ] Remote Config

    • [ ] Storage

  • Are you using TypeScript?

    • [x] No

    • [ ] Yes, version: N/A

  • Are you using Expo, e.g. ExpoKit?

    • [x] No

    • [ ] Yes, I've _not_ ejected

    • [ ] Yes, but I have ejected to ExpoKit

    • [ ] Yes, but I have ejected to vanilla React Native

      - Expo version: N/A


Most helpful comment

@oakromulo thank you very much for your help.

Finally I could see the data that I sent to Firebase in real time in iOS, the problem was that I was using the simulator and for some reason it does not send data in real time, in a physical device if I can see the data in real time.

Your guide should really be included in the documentation, it is very complete, I had to read in several forums to be able to integrate analytics into my project since there is not much information.

All 4 comments

@Juliocbr I experienced it quite a few times too. Check out this guide I published on Medium a few weeks ago, it might help you out:
https://medium.com/@oakromulo/firebase-analytics-on-react-native-4b348466f025

Hey @oakromulo that guide is 馃敟 馃憣 - send a PR (if you want) to add it to the docs website - bottom of this file: https://github.com/invertase/react-native-firebase-docs/edit/master/docs/installation/initial-setup.md

@oakromulo thank you very much for your help.

Finally I could see the data that I sent to Firebase in real time in iOS, the problem was that I was using the simulator and for some reason it does not send data in real time, in a physical device if I can see the data in real time.

Your guide should really be included in the documentation, it is very complete, I had to read in several forums to be able to integrate analytics into my project since there is not much information.

@Juliocbr
I'm very glad that I helped you somehow!

@Salakar
Here goes the PR: https://github.com/invertase/react-native-firebase-docs/pull/138

Was this page helpful?
0 / 5 - 0 ratings