$ npm install react-native-merge-images --save
$ react-native link react-native-merge-images
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-merge-images
and addRNMergeImages.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNMergeImages.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.mvpstars.reactnative.mergeimages.RNMergeImagesPackage;
to the imports at the top of the file - Add
new RNMergeImagesPackage()
to the list returned by thegetPackages()
method. Add a comma to the previous item if there's already something there.
- Append the following lines to
android/settings.gradle
:include ':react-native-merge-images' project(':react-native-merge-images').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-merge-images/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-merge-images')
import RNMergeImages from 'react-native-merge-images';
// TODO: What to do with the module?
RNMergeImages;