react-native-vieon-momosdk
v1.0.6
Published
## Getting started
Downloads
7
Readme
react-native-vieon-mo-mo-sdk
Getting started
$ npm install react-native-vieon-mo-mo-sdk --save
Mostly automatic installation
$ react-native link react-native-vieon-mo-mo-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-vieon-mo-mo-sdk
and addRNMoMoSdk.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNMoMoSdk.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import vieon.reactnative.momosdk.RNMoMoSdkPackage;
to the imports at the top of the file - Add
new RNMoMoSdkPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-vieon-mo-mo-sdk' project(':react-native-vieon-mo-mo-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vieon-mo-mo-sdk/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-vieon-mo-mo-sdk')
Windows
- In Visual Studio add the
RNMoMoSdk.sln
innode_modules/react-native-vieon-mo-mo-sdk/windows/RNMoMoSdk.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Mo.Mo.Sdk.RNMoMoSdk;
to the usings at the top of the file - Add
new RNMoMoSdkPackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
import RNMoMoSdk from 'react-native-vieon-mo-mo-sdk';
// TODO: What to do with the module?
RNMoMoSdk;