2018-04-24 11:52:58 +03:00
2018-04-24 11:52:58 +03:00
2018-04-24 11:52:58 +03:00
2018-04-24 11:52:58 +03:00
2018-04-24 11:52:58 +03:00
2018-04-24 11:52:58 +03:00
2018-04-24 11:52:58 +03:00
2018-04-24 11:52:58 +03:00
2018-04-24 11:52:58 +03:00

react-native-background-download

Getting started

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

Mostly automatic installation

$ react-native link react-native-background-download

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-background-download and add RNBackgroundDownload.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNBackgroundDownload.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/[...]/MainActivity.java
  • Add import com.eko.RNBackgroundDownloadPackage; to the imports at the top of the file
  • Add new RNBackgroundDownloadPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-background-download'
    project(':react-native-background-download').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-background-download/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-background-download')
    

Usage

import RNBackgroundDownload from 'react-native-background-download';

// TODO: What to do with the module?
RNBackgroundDownload;
Description
A library for React-Native to help you download large files on iOS and Android both in the foreground and most importantly in the background.
Readme 1.3 MiB
Languages
Java 41%
Objective-C 26.5%
TypeScript 20.5%
JavaScript 8.1%
Ruby 3.1%
Other 0.8%