nativescript-bugsee
by mrjameshall | v0.1.0
Very rough test of a NativeScript plugin
npm i --save nativescript-bugsee
  • Version: 0.1.0
  • GitHub:
  • Downloads:
    • Last Day:   0
    • Last Week:  0
    • Last Month: 0

Bugsee for NativeScript

This plugin adds Bugsee support to your NativeScript application. Record the last 30 seconds of your app before it crashes. Allow people to submit bugs by shaking or screenshotting your app.

Demo GIF

Installation

To install the plugin do:

tns plugin add nativescript-bugsee

Usage

iOS

Put this is your main application JS file:

// Replace this with your actual token
Bugsee.launchWithToken('0000000-0000-0000-0000-00000000000')

Android

This is a little trickier as it needs to extend the main Application class.

Create this file at app/application.android.js:

(Replace yourApplicationName with your app name, and the token with your Android token)

/* global android com */
const superProto = android.app.Application.prototype
const Bugsee = com.bugsee.library.Bugsee

// the first parameter of the `extend` call defines the package and the name for the native *.JAVA file generated.
android.app.Application.extend('org.yourApplicationName.Application', {
onCreate: function () {
superProto.onCreate.call(this)
// At this point modules have already been initialized
Bugsee.launch(this, '0000000-0000-0000-0000-00000000000')
},
attachBaseContext: function (base) {
superProto.attachBaseContext.call(this, base)
}
})

In app/App_Resources/Android/src/AndroidManifest change from this:

<application android:name="com.tns.NativeScriptApplication"

to this - to match the application name above:

<application android:name="org.yourApplicationName.Application"

License

Apache License Version 2.0, January 2004