$ npm install git+https://github.com/iChonal/react-native-sdk-kochava.git --save
or
$ yarn add https://github.com/iChonal/react-native-sdk-kochava.git
To intergrate native SDK, see Kochava Docs.
$ react-native link react-native-sdk-kochava
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-sdk-kochavaand addRNSdkKochava.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNSdkKochava.ato your project'sBuild Phases➜Link Binary With Libraries
- Append the following lines to
android/settings.gradle:include ':react-native-sdk-kochava' project(':react-native-sdk-kochava').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sdk-kochava/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:implementation project(':react-native-sdk-kochava') - Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import io.github.ichonal.sdkkochava.RNSdkKochavaPackage;to the imports at the top of the file - Add
new RNSdkKochavaPackage()to the list returned by thegetPackages()method
import KochavaTracker from 'react-native-sdk-kochava';