SunnyGurnani / react-native-bugsnag

React Native package to easily track your bugs realtime (using the bugsnag.com platform)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Native Bugsnag npm version

Easily add Bugsnag exception monitoring support to your React Native application.

This is a third party library and we are NOT affiliated with Bugsnag.._

This library works with iOS and Android, and what it actually does is, it helps you poor folk get reports from crashes/exceptions right into the bugsnag dashboard. You can then go ahead and repair the bug yourself without having to ask your team members or your client a zillion questions just to be able to reproduce the error. Now you know where the crash happened and why remotely and instantaneously. Isn't that neat? You're so cool!

Installation

Start with:

rnpm install react-native-bugsnag

Theres a quick guide over to our wiki.

Look ma, theres an working example too:

Its SUPER easy to run this example project.

All you have to do after you've downloaded this project is: cd Example and npm run setupIOS and thats it, the console will ask you for your bugsnag project id, it will automatically set everything up and start Xcode, you don't have to move a finger.

Check it out here

Enjoy!

##Sample code:

import * as RNBugsnag from 'react-native-bugsnag';

class AnExampleClass {
  /**
   * ## Constructor
   */
  constructor( props ) {

    //setup() must be only called once in the entire Application.
    let bugsnag = RNBugsnag.setup({suppressDevErrors:false, identifier:{userId: "aUserId", userEmail:"anEmail@domain.com", userFullname:"aFullName"}});

    setTimeout(function(){
      bugsnag.notify("WhateverError", "This error was just meant to be.", "error"); 
    }, 3000);

  }
};

Breaking change

Now Bugsnag is just exporting bunch of functions so just call setup once

Checklist:

  • Supports iOS.
  • Supports Android.
  • Configure Bugsnag from JS.
  • Handle different handled exceptions in JS.
  • Show line numbers (and method names?) in JS errors.
  • Test RNPM installation process and confirm its working.

Support

If you like the component and want to support it, feel free to donate any amount or help with issues.

Thank you.

About

React Native package to easily track your bugs realtime (using the bugsnag.com platform)

License:MIT License


Languages

Language:Objective-C 53.7%Language:C 29.9%Language:C++ 13.6%Language:Objective-C++ 1.0%Language:Java 0.5%Language:Ruby 0.5%Language:JavaScript 0.3%Language:Swift 0.2%Language:Makefile 0.1%Language:Python 0.1%Language:Shell 0.1%