Plugin is still WIP
Feel free to donate
Also via greenaddress
$ tns plugin add nativescript-fabric
Create a file fabric.json in the project root folder:
{
"apiKey": "",
"apiSecret": ""
}
Add the API-Key to your AndroidManifest.xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="__PACKAGE__" android:versionCode="385" android:versionName="1.0.14">
....
<application android:name="com.tns.NativeScriptApplication" android:allowBackup="true" android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/AppTheme">
...
<meta-data android:name="io.fabric.ApiKey" android:value="**<API-KEY>**"/>
</application>
</manifest>
No manuel setup needed
For more details see fabric.io/kits/android/crashlytics.
For more details see fabric.io/kits/ios/crashlytics.
Init the plugin in your app (for angular apps use main.ts):
import {Fabric} from 'nativescript-fabric';
Fabric.init();
Afterwards you can use the instance methods for logging (general error logging is already added):
Fabric.logSignUp(method: string, success: boolean);Fabric.logLogin(method: string, success: boolean);Fabric.logContentView(id: string, name: string, type: string)Fabric.logCustomEvent(withName: string, customAttributes: Map<String, String>)Fabric.logError(error: any, msg?: string)

