/react-native-instabug

In-App Conversations and Bug Reporting for React Native

Primary LanguageJavaMIT LicenseMIT

React Native plugin for the Instabug service

README: English | 中文

Build Status npm version npm version js-standard-style Github Issues PRs Welcome

The Simplest In-App Feedback and Bug Reportng for Mobile Apps!

Android Demo

Getting Started

npm install --save react-native-instabug

Mostly automatic installation

react-native link react-native-instabug

Manual installation

Android

Edit android/settings.gradle to look like this:

include ':app'

+ include ':react-native-instabug'
+ project(':react-native-instabug').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-instabug/android')

Edit android/app/build.gradle to look like this:

dependencies {
  compile fileTree(dir: "libs", include: ["*.jar"])
  compile "com.android.support:appcompat-v7:23.0.1"
  compile "com.facebook.react:react-native:+"  // From node_modules
+ compile project(':react-native-instabug')
}

only RN 0.29+ Edit your MainApplication.java (deep in android/app/src/main/java/...) to look like this (note two places to edit):

+ import com.kenny.instabug.InstabugPackage;
...
  new MainReactPackage(),
+ new InstabugPackage("your_app_token_here", MainApplication.this)
}

iOS

- Welcome iOS developer join, write this component together!
  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-instabug and add ios/RCTInstabug.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRCTInstabug.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Usage

To see all available function take a look at index.android.js

_testShowIntroMessage() {
  Instabug.showIntroMessage();
}

_testInstabug() {
  Instabug.setUserEmail('your@gmail.com');
  Instabug.setUserData('This is your committed user data');
  Instabug.setUsername('Your user name');
  Instabug.addTags('react-native,bug,feedback,instabug');
  Instabug.changeInvocationEvent('Shake');
  Instabug.reportBug();
}

Credits