Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

instabug-reactnative

Package Overview
Dependencies
Maintainers
1
Versions
273
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

instabug-reactnative

React Native plugin for integrating the Instabug SDK

  • 1.0.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.8K
increased by18.41%
Maintainers
1
Weekly downloads
 
Created
Source

instabug-reactnative

Dependencies

react-native version >0.26

Installation

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

$ react-native link instabug-reactnative

iOS installation
  1. Open your app .xcodeproj file
  2. Add the following line to your "Podfile": pod 'Instabug', '~> 7.0'
  3. run pod install
  4. Run your project (Cmd+R)<
Android Manual installation
  1. Open up android/app/src/main/java/[...]/MainApplication.java
  • Add

    import com.instabug.reactlibrary.RNInstabugReactnativePackage;
    

to the imports at the top of the file

  • Add

    new RNInstabugReactnativePackage("YOUR_ANDROID_APPLICATION_TOKEN",MainApplication.this,"INVOCATION_EVENT");
    

to the list returned by the getPackages() method 2. Append the following lines to android/settings.gradle:

```gradle
include ':instabug-reactnative'
project(':instabug-reactnative').projectDir = new File(rootProject.projectDir, 	'../node_modules/instabug-reactnative/android')
```

3. Insert the following lines inside the dependencies block in android/app/build.gradle:

```gradle
  compile project(':instabug-reactnative')
```

Usage


import Instabug from'instabug-reactnative';

iOS Example

class testApp extends Component {
  constructor() {
    super();
    Instabug.startWithToken('YOUR_TOKEN', Instabug.invocationEvent.floatingButton);
  }
  ...
}

You can check the rest of the APIs here Wiki.

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

Android Example

Usage

To initialize Instabug in your app, you only need to link instabug-reactnative correctly by overwriting

"YOUR_ANDROID_TOKEN" text by your android app token, "button" text by your desired invocation event, "light" text by your desired color theme, and can take a wide range of optional parameters for configuration.

  1. Open up android/app/src/main/java/[...]/MainApplication.java

after linking the plugin, you should find the getPackages method looks like

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
            new RNInstabugReactnativePackage("YOUR_ANDROID_TOKEN",MainApplication.this,"button","light")
      );
    }

The invocation event can be specified as one of the following values:

valuenative equivalentdescription
'shake'InstabugInvocationEvent.SHAKEShaking the device while in any screen to show the feedback form.
'button'InstabugInvocationEvent.FLOATING_BUTTONShows a floating button on top of all views, when pressed it takes a screenshot.
'screenshot'InstabugInvocationEvent.SCREENSHOT_GESTURETaking a screenshot using the Home+Lock buttons while in any screen to show the feedback form, substituted with IBGInvocationEventShake on iOS 6.1.3 and earlier.
'swipe'InstabugInvocationEvent.TWO_FINGER_SWIPE_LEFTSwiping two fingers left while in any screen to show the feedback form.
'none'InstabugInvocationEvent.NONENo event will be registered to show the feedback form, you'll need to code your own and call the method invoke.

The InstabugColorTheme can be specified as one of the following values:

valuenative equivalentdescription
'light'InstabugColorTheme.InstabugColorThemeLightlight theme is color theme to use for the SDK's UI
'dark'InstabugColorTheme.InstabugColorThemeDarkDark theme is color theme to use for the SDK's UI

License

This software is released under MIT License.

© 2016 Instabug. All rights reserved.

Keywords

FAQs

Package last updated on 22 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc