Crashlytics Plugin for Cordova/PhoneGap 3.0 (iOS and Android)
Installation
-
Make sure that you have Node and Cordova CLI or PhoneGap's CLI installed on your machine.
-
Add Crashlytics plugin (IDE plugin) to the Android / iOS project https://www.crashlytics.com/downloads
-
Create a native crash. Go to step 4 if you can see the crash report on the dashboard.
-
Add a plugin to your project using Cordova CLI:
cordova plugin add https://github.com/francescobitmunks/cordova-plugin-crashlytics
Or using PhoneGap CLI:
phonegap local plugin add https://github.com/francescobitmunks/cordova-plugin-crashlytics
Usage
{ crashlyticsPlugin; crashlyticsPlugin; crashlyticsPlugin; crashlyticsPlugin; crashlyticsPlugin; crashlyticsPlugin; crashlyticsPlugin; crashlyticsPlugin; crashlyticsPlugin; crashlyticsPlugin;}
Methods
setUserIdentifier(value) - iOS, Android
Set the user identifier value
setUserName(value) - iOS, Android
Set the username
setUserEmail(value) - iOS, Android
Set the user email
setStringValueForKey(value, key) - iOS, Android
Set String value for key
setIntValueForKey(value, key) - iOS, Android
Set integer value for key
setBoolValueForKey(value, key) - iOS, Android
Set boolean for key
setFloatValueForKey(value, key) - iOS, Android
Set float for key
addLog(value) - iOS, Android
Add log for the crash.
sendCrash() - iOS, Android
Send a (fatal) crash to the backand of CrashLytics.