GithubHelp home page GithubHelp logo

isabella232 / nativescript-fabric Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gameanalytics/nativescript-fabric

0.0 0.0 0.0 3.91 MB

Handling App URLs in nativescript apps

License: MIT License

Shell 0.74% JavaScript 83.95% Ruby 0.21% TypeScript 13.12% CSS 0.33% HTML 1.65%

nativescript-fabric's Introduction

NativeScript Fabric Plugin apple android

Greenkeeper badge Build Status Donate with Bitcoin

npm version Maintainability

NPM

Feel free to donate

Or donate Bitcoins: bitcoin:3NKtxw1SRYgess5ev4Ri54GekoAgkR213D

Bitcoin

Also via greenaddress

Usage

Installation

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

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.

nativescript-fabric's People

Contributors

alexdohmen avatar greenkeeper[bot] avatar hypery2k avatar tdermendjiev avatar tsvetanmilanov avatar

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.