# react-native-gitple-sdk

> React-native SDK for Gitple

Latest version **2.0.4** (published 2021-12-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-gitple-sdk
pnpm add react-native-gitple-sdk
yarn add react-native-gitple-sdk
bun add react-native-gitple-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 | 2.0.4 |
| Published | 2021-12-07 |
| First published | 2018-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 13.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Gitple |
| Maintainers | gitple |
| Keywords | gitple, react-native |

## Links

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

## Dependencies (2)

- [react-native-webview](https://npm.io/package/react-native-webview.md) ^10.1.1
- [@react-native-community/netinfo](https://npm.io/package/@react-native-community/netinfo.md) ^5.9.2

## Recent versions

- 2.0.4 (latest) — 2021-12-07
- 2.0.3 — 2021-02-09
- 2.0.2 — 2021-01-14
- 2.0.1 — 2020-05-29
- 2.0.0 — 2020-05-29
- 1.2.3 — 2018-03-21
- 1.2.2 — 2018-02-27
- 1.2.1 — 2018-02-27
- 1.2.0 — 2018-02-27
- 1.1.2 — 2018-02-22
- 1.1.1 — 2018-02-07
- 1.1.0 — 2018-02-05
- 1.0.0 — 2018-01-23
- 0.0.5 — 2018-01-18
- 0.0.4 — 2018-01-17
- … 3 more at https://npm.io/package/react-native-gitple-sdk/versions

## README

# react-native-gitple-sdk

> React-Native for Gitple

- v1.2 : Using React Native < 0.59
- v2.0 : Using React Native >= 0.60

## Install(v2.0)
- install gitple sdk 
```bash
yarn add react-native-gitple-sdk
```

- install dependencies
```bash
yarn add react-native-webview@10.1.1 @react-native-community/netinfo
```

- linking native code on iOS
```
npx pod-install
```

## Install(v1.2)
- install gitple sdk 
```bash
npm i -S react-native-gitple-sdk
```

- linking library
```bash
react-native link react-native-gitple-sdk
```

## Usage

```javascript
import { Gitple, GitpleView } from 'react-native-gitple-sdk';

class GitpleChat extends React.Component {
  render() {
    let appCode = 'xxxxxxxxxxx';
    let user = { id: 'xxxxxx', email: 'reactnative@gitple.com', name: 'reactnative' };
    let hideHeader = true;

    Gitple.initialize(appCode);   // initialize gitple

    Gitple.setUser(user).then(() => {   // set user info

      Gitple.unreadCount().then((count) => {  // get unread count
        console.info('Gitple get unreadCount:', count);
      }).catch((error) => {
        console.warn('Gitple get unreadCount failed. error:', error);
      });
      
    }).catch((error) => {
      console.warn('Gitple setUser failed. error:', error);
    });    
    
    return (
      <GitpleView 
        hideHeader={hideHeader} />
    );
  }
}
``` 

## Document
[gitple react-native SDK](http://guide.gitple.io/#/react-native-sdk)

------

Powered by [Gitple](https://gitple.io)

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