lucle / cordova-plugin-firebase-crash

Cordova plugin for Firebase Crashlytics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cordova plugin for Firebase Crashlytics

NPM version NPM downloads NPM total downloads PayPal donate 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

License:MIT License


Languages

Language:JavaScript 96.3%Language:PEG.js 1.6%Language:Objective-C 0.7%Language:Makefile 0.7%Language:Java 0.6%Language:HTML 0.1%