# react-native-instabug-sdk

> React Native wrapper for Instabug.

Latest version **4.3.0** (published 2017-08-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-instabug-sdk
pnpm add react-native-instabug-sdk
yarn add react-native-instabug-sdk
bun add react-native-instabug-sdk
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.3.0 |
| Published | 2017-08-23 |
| First published | 2016-10-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Mark Miyashita |
| Maintainers | negativetwelve |
| Keywords | bugs, instabug, react-native, screenshots |

## Links

- npm: https://www.npmjs.com/package/react-native-instabug-sdk
- Repository: https://github.com/negativetwelve/react-native-instabug-sdk
- Issues: https://github.com/negativetwelve/react-native-instabug-sdk/issues
- npm.io page: https://npm.io/package/react-native-instabug-sdk

## Dependencies (1)

- [react-native-package](https://npm.io/package/react-native-package.md) ^2.5.0

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 4.3.0 (latest) — 2017-08-23
- 4.2.2 — 2017-08-22
- 4.2.1 — 2017-08-22
- 4.2.0 — 2017-08-22
- 4.1.0 — 2017-08-22
- 4.0.2 — 2017-08-16
- 4.0.1 — 2017-08-15
- 4.0.0 — 2017-08-15
- 3.3.1 — 2017-08-14
- 3.3.0 — 2017-08-14
- 3.2.0 — 2017-08-14
- 3.1.0 — 2017-08-14
- 3.0.0 — 2017-08-13
- 2.2.0 — 2017-08-01
- 2.1.0 — 2017-07-31
- … 10 more at https://npm.io/package/react-native-instabug-sdk/versions

## README

# react-native-instabug-sdk

[![npm](https://img.shields.io/npm/v/react-native-instabug-sdk.svg)](https://www.npmjs.com/package/react-native-instabug-sdk)
[![npm](https://img.shields.io/npm/dt/react-native-instabug-sdk.svg)](https://www.npmjs.com/package/react-native-instabug-sdk)
[![npm](https://img.shields.io/npm/l/react-native-instabug-sdk.svg)](https://github.com/negativetwelve/react-native-instabug-sdk/blob/master/LICENSE)
[![CircleCI branch](https://img.shields.io/circleci/project/github/negativetwelve/react-native-instabug-sdk/master.svg)](https://circleci.com/gh/negativetwelve/react-native-instabug-sdk)

React Native wrapper for [Instabug](https://instabug.com/).

## Setup

```
yarn add react-native-instabug-sdk
```

### iOS

#### react-native link

```
react-native link react-native-instabug-sdk
```

Unfortunately, you currently need to follow the Cocoapods instructions as well. Need to find a way to link the official Instabug pod via `react-native link`. PRs appreciated!

#### Cocoapods

Add the following to your Podfile:

```
pod "Instabug"
pod "react-native-instabug-sdk", path: "../node_modules/react-native-instabug-sdk"
```

Run `pod install` to update your Pods.

#### Manual

Inside your xcode project file, right click on your "Libraries" folder and select "Add files to MyApp". Navigate to `node_modules/react-native-instabug-sdk/ios/RNInstabug.xcodeproj` and add that to your project. Then select your app's project file on the sidebar, scroll down to "Linked Frameworks and Libraries" and add `libRNInstabug.a` to this list.

### Android

Run the following:

```shell
react-native link react-native-instabug-sdk
```

If you receive an error with RxJava similar to:

```shell
com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/rxjava.properties
  File1: /home/adi/.gradle/caches/modules-2/files-2.1/io.reactivex/rxjava/1.1.8/f9dbae366a6a3d6b5041c5e8db0dcdfdc35c27b5/rxjava-1.1.8.jar
  File2: /home/adi/.gradle/caches/modules-2/files-2.1/io.reactivex.rxjava2/rxjava/2.0.0-RC1/3ee37bb825446a3bafac68a46f2397a8affd9b68/rxjava-2.0.0-RC1.jar
```

Then update your `app/build.gradle` file to include:

```gradle
android {
  ...

  packagingOptions {
    exclude 'META-INF/rxjava.properties'
  }
}
```

## Usage

```js
// Import the module.
import Instabug from 'react-native-instabug-sdk';

// Start the reporter with your token.
// This means you can trigger it via taking a screenshot.
Instabug.startWithToken(token, Instabug.events.screenshot);

// Invoke the reporter manually.
Instabug.invoke();

// Hide the reporter.
Instabug.dismiss();

// Set the user's name.
Instabug.setUserName("Mark Miyashita");

// Set the user's email.
Instabug.setUserEmail("negativetwelve@gmail.com");
```

Feature parity with the official iOS SDK coming soon. PRs welcome!

---
_Source: https://npm.io/package/react-native-instabug-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
