Skip to content
A NativeScript plugin for Raygun error reporting.
JavaScript Ruby
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
platforms Initial commit Dec 8, 2015
.editorconfig Initial commit Dec 8, 2015
LICENSE Preparing for 1.0.0 release Jan 18, 2016
README.md We're not actively maintaining this plugin Jul 22, 2016
package.json Fix package.json syntax Jan 18, 2016
raygun.android.js Initial commit Dec 8, 2015
raygun.ios.js Initial commit Dec 8, 2015

README.md

nativescript-raygun

Note: this plugin is not being actively maintained.

nativescript-raygun is a plugin for NativeScript which adds support for error reporting with Raygun. The plugin uses the native Raygun SDKs for iOS and Android.

Installation

tns plugin add nativescript-raygun

Usage

Firstly, you need to create Raygun applications for your iOS and Android apps. You'll get a separate API key for each.

Somewhere central in your app (such as app.js), you need to start the Raygun error reporting.

var application = require("application");
var raygun = require("nativescript-raygun");

raygun.start(application.ios ? "your-ios-key-here" : "your-android-key-here");

And that's it! If your app crashes, the error will be sent to Raygun (see notes below).

If you have users that log into your app, you will want to identify them with Raygun so errors they encounter will be tracked against that user. After starting Raygun error reporting, or when the user logs into your app, identify them:

raygun.identify({
  identifier: user.id.toString(), // identifier must be a string
  email: user.email,
  fullName: user.first_name + " " + user.last_name,
  firstName: user.first_name
});

Notes

When testing that error reporting is working correctly, note that for iOS, errors will not be submitted until the app is next opened by the user. Also note that errors will not be submitted when the app is hooked up to the Xcode debugger.

To test error reporting is working on iOS, you should run the app on a simulator, hit the stop button in Xcode, start the app in the simulator (which is no longer hooked up to the Xcode debugger) and cause a crash. Open the app, and the crash report will be sent to Raygun.

Android crashes will be submitted immediately.

You can’t perform that action at this time.