Skip to content

venkadesh-p/cordova-plugin-firebase-crash

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cordova plugin for Firebase Crashlytics

NPM version NPM downloads Twitter

Donate Your help is appreciated. Create a PR, submit a bug or just grab me 🍺

Index

Supported Platforms

  • iOS
  • Android

Installation

$ 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.

Disable data collection

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.

Methods

Every method returns a promise that fulfills when a call was successful.

log(message)

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");

logError(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");

setUserId(userId)

Sets the user identifier property for crashlytics reporting. Compare Firebase documentation.

cordova.plugins.firebase.crashlytics.setUserId("12345");

setEnabled(enabled)

Sets whether crashlytics collection is enabled for this app on this device.

cordova.plugins.firebase.crashlytics.setEnabled(false);

About

Cordova plugin for Firebase Crashlytics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 46.2%
  • Objective-C 39.0%
  • Java 14.8%