Giter Club home page Giter Club logo

cordova-plugin-firebase-crash's Introduction

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_POD_VERSION ANDROID_FIREBASE_CRASHLYTICS_VERSION to override dependency versions for Firebase SDKs:

$ cordova plugin add cordova-plugin-firebase-crash --variable IOS_FIREBASE_POD_VERSION="~> 8.8.0" --variable ANDROID_FIREBASE_CRASHLYTICS_VERSION="18.2.+"

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

setCustomKey(key, value)

Add custom key/value pairs to crashlytics report. Compare Firebase documentation.

cordova.plugins.firebase.crashlytics.setCustomKey("my-string-key", "test value");
cordova.plugins.firebase.crashlytics.setCustomKey("my-number-key", 123);
cordova.plugins.firebase.crashlytics.setCustomKey("my-boolean-key", true);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.