$ npm install react-native-video-trimmer --save
$ react-native link react-native-video-trimmer
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-video-trimmer
and addRNVideoTrimmer.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNVideoTrimmer.a
to your project'sBuild Phases
➜Link Binary With Libraries
- cd
ios
- create Podfile sample Podfile
https://facebook.github.io/react-native/docs/integration-with-existing-apps
- add
pod 'ICGVideoTrimmer', :git => 'https://github.com/nixplay/ICGVideoTrimmer.git'
to Podfile - run
pod install
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNVideoTrimmerPackage;
to the imports at the top of the file - Add
new RNVideoTrimmerPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-video-trimmer' project(':react-native-video-trimmer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video-trimmer/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-video-trimmer')
- In Visual Studio add the
RNVideoTrimmer.sln
innode_modules/react-native-video-trimmer/windows/RNVideoTrimmer.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Video.Trimmer.RNVideoTrimmer;
to the usings at the top of the file - Add
new RNVideoTrimmerPackage()
to theList<IReactPackage>
returned by thePackages
method
import RNVideoTrimmer from 'react-native-video-trimmer';
// TODO: What to do with the module?
RNVideoTrimmer;