Reputation: 21
I am using react native firebase crashlytics package. I have already configured and installed the @react-native-firebase/app @react-native-firebase/auth modules successfully. I am now trying to implement client side logs using the crashlytics log function, with no success. I have followed the instructions in the official documentation site and added the @react-native-firebase/crashlytics to my expo plugins array. However, in the documentation they indicate that in order for it to work under a development build, a firebase.json config file must be provided, and so I did - but it seems that expo build completely ignores it. I have tried several other methods as well (f.e providing the firebase.json configurations in the expo plugins array itself - again - did not work.) attaching my app.json relevant fields and firebase.json file. I will appreciate any help, been stuck on it for days now.
app.json:
"expo": { ..., "plugins": [ "@react-native-firebase/app", "@react-native-firebase/auth", "@react-native-firebase/crashlytics", [ "expo-build-properties", { "ios": { "useFrameworks": "static" } } ] ], ... }
firebase.json (in the root folder of course):
{ "react-native": { "crashlytics_debug_enabled": true, "crashlytics_auto_collection_enabled": false } }
Tried to add firebase.json file, tried to add configurations like in the "expo-build-properties" described above - no success in development builds both on ios and android builds.
Upvotes: 1
Views: 930
Reputation: 187
This helped me to resolve the issue.
https://zaferayan.medium.com/expo-firebase-integration-95a745ae2dfe
Had to rebuild the app to ensure all was wired properly! and also try to check
if (crashlytics.isCrashlyticsCollectionEnabled) {
console.log('Crashlytics is enabled')
} else {
console.log('Crashlytics is disabled');
}
Hope it helps!
Upvotes: 0