Skip to content

Instabug/Instabug-React-Native

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

instabug-reactnative

Dependencies

react-native version >0.26

Installation

iOS

$ npm install https://github.com/Instabug/instabug-reactnative --save

$ rnpm link instabug-reactnative

  1. Open your app .xcodeproj file
  2. Add the following line to your "Podfile": pod 'Instabug', '~> 6.0.0'
  3. run pod install
  4. Run your project (Cmd+R)<

Android (Pending)

$ npm install https://github.com/Instabug/instabug-reactnative --save

$ rnpm link instabug-reactnative

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.instabug.reactlibrary.RNInstabugReactnativePackage; to the imports at the top of the file
  • Add new RNInstabugReactnativePackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':instabug-reactnative' project(':instabug-reactnative').projectDir = new File(rootProject.projectDir,	'../node_modules/instabug-reactnative/android') 
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
     compile project(':instabug-reactnative') 

Usage

import Instabug from'instabug-reactnative'; class testApp extends Component { constructor() { super(); Instabug.startWithToken('YOUR_TOKEN', Instabug.constants.invocationEvent.floatingButton); } ... }

iOS

If your app doesn't already access the microphone or photo library, you'll need to add the following 2 keys to your app's info.plist file:

NSMicrophoneUsageDescription NSPhotoLibraryUsageDescription 

License

This software is released under MIT License.

© 2016 Instabug. All rights reserved.