Cordova plugin for Firebase Crashlytics
Your help is appreciated. Create a PR, submit a bug or just grab me 🍺 |
---|
- iOS
- Android
$ cordova plugin add cordova-plugin-firebase-crash
If you get an error about CocoaPods being unable to find compatible versions, run
$ pod repo update
Use variables IOS_FIREBASE_CRASHLYTICS_VERSION
ANDROID_FIREBASE_CRASHLYTICS_VERSION
to override dependency versions for Firebase SDKs.
In some cases, you may wish to temporarily or permanently disable collection of crash data. You can set the value of variable FIREBASE_CRASHLYTICS_COLLECTION_ENABLED
to false
to prevent collecting any user data:
$ cordova plugin add cordova-plugin-firebase-crash --variable FIREBASE_CRASHLYTICS_COLLECTION_ENABLED=false
Later you can re-enable crashlytics (for instance after getting end-user consent) using method setEnabled.
Every method returns a promise that fulfills when a call was successful.
Add logging that will be sent with your crash data in case of app crash. Compare Firebase documentation.
cordova.plugins.firebase.crashlytics.log("my custom log message");
Log non-fatal exceptions in addition to automatically reported app crashes. Compare Firebase documentation.
cordova.plugins.firebase.crashlytics.logError("my non-fatal exception message");
Sets the user identifier property for crashlytics reporting. Compare Firebase documentation.
cordova.plugins.firebase.crashlytics.setUserId("12345");
Sets whether crashlytics collection is enabled for this app on this device.
cordova.plugins.firebase.crashlytics.setEnabled(false);