2.0.2 • Published 5 years ago

nativescript-fabric v2.0.2

Weekly downloads
167
License
MIT
Repository
github
Last release
5 years ago

NativeScript Fabric Plugin apple android

Greenkeeper badge Build Status Donate with Bitcoin

npm version Maintainability

NPM

Feel free to donate

Bitcoin

Also via greenaddress

Usage

Installation

Go to Crashlytics and pick of the needed API-Key and API-Secret:

npm.io

Create a file fabric.json in the project root folder and add the API-Key and API-Secret:

{
    "using_ios": true,
    "using_android": true,
    "api_key": "...",
    "api_secret": "..."
}
$ tns plugin add nativescript-fabric

Or if you want to use the development version (nightly build), which maybe not stable!:

$ tns plugin add nativescript-fabric@next

Android

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>

iOS

No further confiugration needed

Additional information

Android

For more details see fabric.io/kits/android/crashlytics.

iOS

For more details see fabric.io/kits/ios/crashlytics.

API

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)

Angular

import { FabricModule } from 'nativescript-fabric/angular';

NgModule({
  ...
  imports: [
    FabricModule.forRoot()
  ],

Known Issues

com.android.ide.common.process.ProcessException

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithDexForF0F1F2F3F4F5Debug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: Cannot merge new index 69013 into a non-jumbo instruction!nto a non-jumbo instruction!

set the following in your app.gradle:

android {
    ...
    dexOptions {
        jumboMode true
    }

}

XML Parsing error

Error:/app/build/intermediates/res/merged/debug/values/com_crashlytics_build_id.xml uncompiled XML file passed as argument. Must be compiled first into .flat file.

Try adding:

android.enableAapt2 = false

to your gradle.properties file.

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.6-master-38

6 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1-develop-98

7 years ago

1.0.1

7 years ago

1.0.0-develop-93

7 years ago

1.0.0-87-develop

7 years ago

1.0.0

7 years ago

0.3.1-develop-83

7 years ago

0.3.1-develop79

7 years ago

0.3.1

7 years ago

0.3.0-develop-67

7 years ago

0.2.2-develop-66

7 years ago

0.3.0

7 years ago

0.2.2-develop-65

7 years ago

0.2.2-develop-64

7 years ago

0.2.2-develop-63

7 years ago

0.2.2-develop-56

7 years ago

0.2.2-develop-55

7 years ago

0.2.2-develop-54

7 years ago

0.2.2-develop-50

7 years ago

0.2.2-master-26

7 years ago

0.2.2-develop-49

7 years ago

0.2.2

7 years ago

0.2.1-develop-47

7 years ago

0.2.1-develop-46

7 years ago

0.2.1-master-25

7 years ago

0.2.1-master-24

7 years ago

0.2.1-master-23

7 years ago

0.2.1-develop-45

7 years ago

0.2.1-master-22

7 years ago

0.2.1-develop-44

7 years ago

0.2.1-develop-42

7 years ago

0.2.1-develop-41

7 years ago

0.2.1-develop-40

7 years ago

0.2.0-develop-39

7 years ago

0.2.1

7 years ago

0.2.0-develop-38

7 years ago

0.2.0-37

7 years ago

0.2.0-1

7 years ago

0.2.0-16

7 years ago

0.2.0-36

7 years ago

0.2.0

7 years ago

0.1.5-35

7 years ago

0.1.5-34

7 years ago

0.1.5-33

7 years ago

0.1.5-32

7 years ago

0.1.4-31

7 years ago

0.1.4-30

7 years ago

0.1.4-28

7 years ago

0.1.4-27

7 years ago

0.1.5-1

7 years ago

0.1.5-15

7 years ago

0.1.5

7 years ago

0.1.4-26

7 years ago

0.1.4-14

7 years ago

0.1.4-1

7 years ago

0.1.4-13

7 years ago

0.1.3-25

7 years ago

0.1.4

7 years ago

0.1.3-12

7 years ago

0.1.3

7 years ago

0.1.2-24

7 years ago

0.1.2-23

7 years ago

0.1.2-11

7 years ago

0.1.1-10

7 years ago

0.1.2

7 years ago

0.1.1-9

7 years ago

0.1.1-22

7 years ago

0.1.0-21

7 years ago

0.1.1

7 years ago

0.1.1-8

7 years ago

0.1.0-7

7 years ago

0.1.0-20

7 years ago

0.1.0-6

7 years ago

0.1.0-5

7 years ago

0.1.0

7 years ago

0.0.6-19

7 years ago

0.0.6-18

7 years ago

0.0.6-16

7 years ago

0.0.6-4

7 years ago

0.0.6-14

7 years ago

0.0.6-13

7 years ago

0.0.6-3

7 years ago

0.0.6-12

7 years ago

0.0.6-1

7 years ago

0.0.6-10

7 years ago

0.0.6-9

7 years ago

0.0.6-2

7 years ago

0.0.6-8

7 years ago

0.0.6

7 years ago

0.0.5-7

7 years ago

0.0.5-6

7 years ago

0.0.5-5

7 years ago

0.0.5-4

7 years ago

0.0.5-3

7 years ago

0.0.5-2

7 years ago

0.0.5-1

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago