react-native-jivo
v1.0.2
Published
React Native jivosite implementation
Downloads
35
Readme
react-native-jivo
jivo sdk for react-native
Installation
- install library
yarn add react-native-jivo
- link
react-native link
copy html directory to your project - see official Jivo sdk repo
Change AppDelegate.m replace
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
with
UINavigationController *rootViewController = [UINavigationController new];
UIViewController *ReactViewController = [UIViewController new];
ReactViewController.view = rootView;
[rootViewController pushViewController:ReactViewController animated:YES];
self.window.rootViewController = rootViewController;
rootViewController.navigationBar.layer.hidden = YES;
Usage
import JivoChat from 'react-native-jivo';
JivoChat.openChat();
JivoChat.emitter.addListener(JivoChat.Events.client_info, listener);
JivoChat.callApiMethod(JivoChat.Methods.getUserInfo);
JivoChat.emitter.removeListener(JivoChat.Events.client_info, listener);
TODO
- [ ] example