Closed rodrijuarez closed 3 years ago
Another nice solution'd be react-native-analytics-segment-io
Analytics setup to call the Promise.resolve whenever the library finishes also all the integrations initialisation, which'd be the expected behaviour
Issue
I'm trying to integrate this library with react-native-firebase but I'm finding the problem that both libraries instantiate twice the FIRApp, I've sorted out through the compatibility issues regarding versions, but I can't do much more about this, I've to instantiate the FIRApp in my AppDelegate given that I want to do something like this in my JS code:
I want to do this to do permissions request or check dynamic links or if the app was opened by FCM. Is there any way for me to solve this or any help by the library so FIRApp isn't instantiated twice if there's an existing FIRApp? In case I wait for the FIRApp initialisation by this library my app crashes with this error message, this is probably because the JS is loaded before the initialisation of Firebase by this library:
The [__FIRAPP_DEFAULT] firebase app has not been initialized!
Code where the application crashes
File:
SEGFirebaseIntegration.m