Reputation: 1165
Has anyone successfully run Firebase Analytics in React Native? There is a react-native-firebase-analytics but it's installation documentation and support is poor. Also it does not install the plugin correctly. If you have been working on FB Analytics in React Native project, please share your tips.
Thanks.
Upvotes: 3
Views: 1851
Reputation: 1181
Are you using firebase sdk for web with react native? Analytics, offline capabilities etc, won't work with the apps if you use firebase sdk for web, check react-native-firebase which acts as a native bridge and enables all the functionalities of firebase for mobile. It has great documentation!
refer : Firebase + React Native: Offline authentication
Edit: I was able to get offline capabilities with in the app using redux-persist independent of the firebase sdk.
Upvotes: 2
Reputation: 29
Agreed with what you have said. I made that work by linking manually and run command
adb shell setprop debug.firebase.analytics.app "package_name"
in react-native cli for enabling debug mode on firebase website.
And don't forget to put file google-services.json
in your android/app
folder.
Upvotes: 0