react-native-hs
Native Bindings for the Helpshift Library. Available for iOS and Android.
Installation (iOS)
npm install --save react-native-hs
cd ios && pod install
- Follow the steps on the Helpshift SDK to complete installation.
Installation (Android)
npm install --save react-native-hs
register module in MainApplication.java
import com.bahikhata.helpshift.HelpShiftPackage;
public List<ReactPackage> createAdditionalReactPackages() {
return Arrays.<ReactPackage>asList(
...,
new HelpShiftPackage()
);
}
Usage
The method names are named the same as in the [iOS SDK][sdk]. Only a few methods are implemented now - I welcome collaboration, pull requests, etc.
FAQ (Android and iOS)
import * as Helpshift from 'react-native-hs';
Helpshift.showFAQs({ 'withTagsMatching' : {'operator' : 'or', 'tags' : ['iPhone', 'iPad']}});
CHAT (Android and iOS)
import * as Helpshift from 'react-native-hs';
Helpshift.showConversation();
Initialize (Android)
import * as Helpshift from 'react-native-hs';
Helpshift.initialize(api_key, domain_name, app_id); //Initialize helpshift sdk.
Set User (Android)
import * as Helpshift from 'react-native-hs';
Helpshift.setUser(userId, name, email); //Set Tracking Parameters.