$ npm install react-native-download-manager --save
$ react-native link react-native-download-manager
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-download-managerand addLKDownloadManager.xcodeproj - In XCode, in the project navigator, select your project. Add
libLKDownloadManager.ato your project'sBuild Phases➜Link Binary With Libraries - Run your project (
Cmd+R)<
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import lightkits.downloadmanager.LKDownloadManagerPackage;to the imports at the top of the file - Add
new LKDownloadManagerPackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':react-native-download-manager' project(':react-native-download-manager').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-download-manager/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':react-native-download-manager')
import LKDownloadManager from 'react-native-download-manager';
// TODO: What to do with the module?
LKDownloadManager;create-react-native-module download-manager --prefix LK --package-identifier lightkits.downloadmanager