$ npm install tapligh-react-native --save
$ react-native link tapligh-react-native
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.tapligh.sdk.TaplighReactNativePackage;to the imports at the top of the file - Add
new TaplighReactNativePackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':tapligh-react-native' project(':tapligh-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/tapligh-react-native/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':tapligh-react-native')
You can find the full documentation here.
import TaplighReactNative from 'tapligh-react-native';
// TODO: What to do with the module?
RNTaplighReactNative;