yarn add react-native-narratiive
react-native link react-native-narratiive # not needed for react-native >= 0.60.0
or if you're using npm
npm install react-native-narratiive --save
react-native link react-native-narratiive # not needed for react-native >= 0.60.0
This will not add the library (libEmTracker.a) to your project. So you will have to add it manually. Also add library search path to target
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-narratiive
and addRNNarratiive.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNNarratiive.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)
-
Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import com.reactnative.narratiive.RNNarratiivePackage;
to the imports at the top of the file - Add
new RNNarratiivePackage()
to the list returned by thegetPackages()
method
- Add
-
Append the following lines to
android/settings.gradle
:include ':react-native-narratiive' project(':react-native-narratiive').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-narratiive/android')
-
Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-narratiive')