0.1.4 • Published 5 years ago
torus-direct-react-native-sdk v0.1.4
torus-direct-react-native-sdk
Getting started
$ npm install torus-direct-react-native-sdk --save
Mostly automatic installation
$ react-native link torus-direct-react-native-sdk
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜torus-direct-react-native-sdkand addRNTorusDirectSdk.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNTorusDirectSdk.ato 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 org.torusresearch.rntorusdirect.RNTorusDirectSdkPackage;to the imports at the top of the file - Add
new RNTorusDirectSdkPackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':torus-direct-react-native-sdk' project(':torus-direct-react-native-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/torus-direct-react-native-sdk/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':torus-direct-react-native-sdk')
Usage
import RNTorusDirectSdk from 'torus-direct-react-native-sdk';
// TODO: What to do with the module?
RNTorusDirectSdk;