-
Hi, Can anyone help me understand how this package initializes Firebase and why it doesn't work in case there are 2 packages using Firebase? Is this expected behavior? I'm ok telling our users they need to call that function, I'm just not 100% sure it's the right way to solve this. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi there! Here's the most basic integration for react-native-firebase, based on our documentation here (https://rnfirebase.io): Seems odd to initialize the '[DEFAULT]' app for Firebase as a secondary app, so I'm not sure that's correct either. Firebase initialization on Android is hooked by the system a little cleverly in that it is done as a ContentProvider since those are instantiated prior to Application::onCreate even similarly, where the default app should be first initialized: why is that not working with your library? a mystery unfortunately but it generates info logs. I suspect logcat would be informative |
Beta Was this translation helpful? Give feedback.
Hi there!
Here's the most basic integration for react-native-firebase, based on our documentation here (https://rnfirebase.io):
https://github.com/mikehardy/rnfbdemo/blob/fc7e943ca95fe1777300985f31db2a075d2da4a5/make-demo.sh#L23-L35
Seems odd to initialize the '[DEFAULT]' app for Firebase as a secondary app, so I'm not sure that's correct either.
Firebase initialization on Android is hooked by the system a little cleverly in that it is done as a ContentProvider since those are instantiated prior to Application::onCreate even
react-native-firebase/packages/app/android/src/reactnative/AndroidManifest.xml
Lines 11 to 15 in 0a80692