$ npm install react-native-bundle-checksum --save
$ react-native link react-native-bundle-checksum
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-bundle-checksumand addRNBundleChecksum.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNBundleChecksum.ato your project'sBuild Phases➜Link Binary With Libraries - Run your project (
Cmd+R)<
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNBundleChecksumPackage;to the imports at the top of the file - Add
new RNBundleChecksumPackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':react-native-bundle-checksum' project(':react-native-bundle-checksum').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-bundle-checksum/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':react-native-bundle-checksum')
- In Visual Studio add the
RNBundleChecksum.slninnode_modules/react-native-bundle-checksum/windows/RNBundleChecksum.slnfolder to their solution, reference from their app. - Open up your
MainPage.csapp
- Add
using Bundle.Checksum.RNBundleChecksum;to the usings at the top of the file - Add
new RNBundleChecksumPackage()to theList<IReactPackage>returned by thePackagesmethod
import RNBundleChecksum from 'react-native-bundle-checksum';
// TODO: What to do with the module?
RNBundleChecksum;