rn-zalo-sdk
v0.0.4
Published
Zalo SDK for React Native
Downloads
4
Readme
react-native-zalo-sdk
Getting started
$ npm install react-native-zalo-sdk --save
Mostly automatic installation
$ react-native link react-native-zalo-sdk
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-zalo-sdk
and addZaloSdk.xcodeproj
- In XCode, in the project navigator, select your project. Add
libZaloSdk.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import ktgeek.zalo.ZaloSdkPackage;
to the imports at the top of the file - Add
new ZaloSdkPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-zalo-sdk' project(':react-native-zalo-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-zalo-sdk/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-zalo-sdk')
Usage
import ZaloSdk from 'react-native-zalo-sdk';
// TODO: What to do with the module?
ZaloSdk;