Skip to content

Driversnote-Dev/react-native-helpscout-beacon

Repository files navigation

react-native-helpscout-beacon

npm version

Integrate the Helpscout Beacon into your React Native app.

This library is compatible with and supported for React Native v0.60+.

Installation

React Native 0.60 and above:

  1. $ yarn add react-native-helpscout-beacon
  2. Add pod 'Beacon' to your Podfile

For React Native 0.59 and below linking will be necessary (not tested): $ react-native link react-native-helpscout-beacon

Update Helpscout SDK

iOS

Can be updated in your main project directory by running

cd ios/ && pod update Beacon

Please create an issue in this repo in case it doesn't work as expected.

Android

Has to be updated in this module's android/build.gradle, i.e. the version in the following line has to be adapted

implementation "com.helpscout:beacon:4.1.0"

Usage example

import HelpscoutBeacon from 'react-native-helpscout-beacon';

// init has to be called first
HelpscoutBeacon.init('my_helpscout_id');
// Login into your helpscout account
HelpscoutBeacon.login(
  'email@address.com',
  'John Smith',
  'user_id_of_john_smith'
);
// Open the helpscout beacon (using a cryptographic signature)
HelpscoutBeacon.open('mySignature');

Method description