2.0.4 • Published 2 years ago

react-native-gitple-sdk v2.0.4

Weekly downloads
19
License
MIT
Repository
github
Last release
2 years ago

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
yarn add react-native-gitple-sdk
  • install dependencies
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
npm i -S react-native-gitple-sdk
  • linking library
react-native link react-native-gitple-sdk

Usage

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


Powered by Gitple

2.0.4

2 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago