ltcaosj / react-native-download-manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-download-manager

Getting started

$ npm install react-native-download-manager --save

Mostly automatic installation

$ react-native link react-native-download-manager

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-download-manager and add LKDownloadManager.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libLKDownloadManager.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. 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 the getPackages() method
  1. 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')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-download-manager')
    

Usage

import LKDownloadManager from 'react-native-download-manager';

// TODO: What to do with the module?
LKDownloadManager;

Create module command

create-react-native-module download-manager --prefix LK --package-identifier lightkits.downloadmanager

About


Languages

Language:Swift 58.5%Language:Java 22.5%Language:Objective-C 9.0%Language:JavaScript 5.4%Language:Ruby 4.6%