mirror of
https://github.com/zoriya/react-native-background-downloader.git
synced 2026-06-06 19:22:14 +00:00
changer all the "download" to "downloader" since npm doesn't like the name
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
# react-native-background-download
|
# react-native-background-downloader
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ On Android we are simulating this process with a separate service dedicated to j
|
|||||||
|
|
||||||
The real challenge using this method is making sure the app's UI if always up-to-date with the downloads that are happening in another process because your app might startup from scratch while the downloads are still running.
|
The real challenge using this method is making sure the app's UI if always up-to-date with the downloads that are happening in another process because your app might startup from scratch while the downloads are still running.
|
||||||
|
|
||||||
`react-native-background-download` gives you an easy API to both downloading large files and re-attaching to those downloads once your app launches again.
|
`react-native-background-downloader` gives you an easy API to both downloading large files and re-attaching to those downloads once your app launches again.
|
||||||
|
|
||||||
## ToC
|
## ToC
|
||||||
|
|
||||||
@@ -22,11 +22,11 @@ The real challenge using this method is making sure the app's UI if always up-to
|
|||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
`$ npm install react-native-background-download --save`
|
`$ npm install react-native-background-downloader --save`
|
||||||
|
|
||||||
### Mostly automatic installation
|
### Mostly automatic installation
|
||||||
|
|
||||||
`$ react-native link react-native-background-download`
|
`$ react-native link react-native-background-downloader`
|
||||||
|
|
||||||
### Manual installation
|
### Manual installation
|
||||||
|
|
||||||
@@ -34,36 +34,36 @@ The real challenge using this method is making sure the app's UI if always up-to
|
|||||||
#### iOS
|
#### iOS
|
||||||
|
|
||||||
1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
|
1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
|
||||||
2. Go to `node_modules` ➜ `react-native-background-download` and add `RNBackgroundDownload.xcodeproj`
|
2. Go to `node_modules` ➜ `react-native-background-downloader` and add `RNBackgroundDownloader.xcodeproj`
|
||||||
3. In XCode, in the project navigator, select your project. Add `libRNBackgroundDownload.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
|
3. In XCode, in the project navigator, select your project. Add `libRNBackgroundDownloader.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
|
||||||
4. Run your project (`Cmd+R`)
|
4. Run your project (`Cmd+R`)
|
||||||
|
|
||||||
#### Android
|
#### Android
|
||||||
|
|
||||||
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
|
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 `import com.eko.RNBackgroundDownloaderPackage;` to the imports at the top of the file
|
||||||
- Add `new RNBackgroundDownloadPackage()` to the list returned by the `getPackages()` method
|
- Add `new RNBackgroundDownloaderPackage()` to the list returned by the `getPackages()` method
|
||||||
2. Append the following lines to `android/settings.gradle`:
|
2. Append the following lines to `android/settings.gradle`:
|
||||||
```
|
```
|
||||||
include ':react-native-background-download'
|
include ':react-native-background-downloader'
|
||||||
project(':react-native-background-download').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-background-download/android')
|
project(':react-native-background-downloader').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-background-downloader/android')
|
||||||
```
|
```
|
||||||
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
|
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
|
||||||
```
|
```
|
||||||
compile project(':react-native-background-download')
|
compile project(':react-native-background-downloader')
|
||||||
```
|
```
|
||||||
|
|
||||||
### iOS - Extra Mandatory Step
|
### iOS - Extra Mandatory Step
|
||||||
In your `AppDelegate.m` add the following code:
|
In your `AppDelegate.m` add the following code:
|
||||||
```objc
|
```objc
|
||||||
...
|
...
|
||||||
#import <RNBackgroundDownload.h>
|
#import <RNBackgroundDownloader.h>
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
||||||
- (void)application:(UIApplication *)application handleEventsForBackgroundURLSession:(NSString *)identifier completionHandler:(void (^)())completionHandler
|
- (void)application:(UIApplication *)application handleEventsForBackgroundURLSession:(NSString *)identifier completionHandler:(void (^)())completionHandler
|
||||||
{
|
{
|
||||||
[RNBackgroundDownload setCompletionHandlerWithIdentifier:identifier completionHandler:completionHandler];
|
[RNBackgroundDownloader setCompletionHandlerWithIdentifier:identifier completionHandler:completionHandler];
|
||||||
}
|
}
|
||||||
|
|
||||||
...
|
...
|
||||||
@@ -75,12 +75,12 @@ Failing to add this code will result in canceled background downloads.
|
|||||||
### Downloading a file
|
### Downloading a file
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import RNBackgroundDownload from 'react-native-background-download';
|
import RNBackgroundDownloader from 'react-native-background-downloader';
|
||||||
|
|
||||||
let task = RNBackgroundDownload.download({
|
let task = RNBackgroundDownloader.download({
|
||||||
id: 'file123',
|
id: 'file123',
|
||||||
url: 'https://link-to-very.large/file.zip'
|
url: 'https://link-to-very.large/file.zip'
|
||||||
destination: `${RNBackgroundDownload.directories.documents}/file.zip`
|
destination: `${RNBackgroundDownloader.directories.documents}/file.zip`
|
||||||
}).begin((expectedBytes) => {
|
}).begin((expectedBytes) => {
|
||||||
console.log(`Going to download ${expectedBytes} bytes!`);
|
console.log(`Going to download ${expectedBytes} bytes!`);
|
||||||
}).progress((percent) => {
|
}).progress((percent) => {
|
||||||
@@ -110,9 +110,9 @@ What happens to your downloads after the OS stopped your app? Well, they are sti
|
|||||||
Add this code to app's init stage, and you'll never lose a download again!
|
Add this code to app's init stage, and you'll never lose a download again!
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import RNBackgroundDownload from 'react-native-background-download';
|
import RNBackgroundDownloader from 'react-native-background-downloader';
|
||||||
|
|
||||||
let lostTasks = await RNBackgroundDownload.checkForExistingDownloads();
|
let lostTasks = await RNBackgroundDownloader.checkForExistingDownloads();
|
||||||
for (let task of lostTask) {
|
for (let task of lostTask) {
|
||||||
console.log(`Task ${task.id} was found!`);
|
console.log(`Task ${task.id} was found!`);
|
||||||
task.progress((percent) => {
|
task.progress((percent) => {
|
||||||
@@ -129,7 +129,7 @@ for (let task of lostTask) {
|
|||||||
|
|
||||||
## API
|
## API
|
||||||
|
|
||||||
### RNBackgroundDownload
|
### RNBackgroundDownloader
|
||||||
|
|
||||||
### `download(options)`
|
### `download(options)`
|
||||||
|
|
||||||
@@ -161,12 +161,12 @@ Checks for downloads that ran in background while you app was terminated. Recomm
|
|||||||
|
|
||||||
### DownloadTask
|
### DownloadTask
|
||||||
|
|
||||||
A class representing a download task created by `RNBackgroundDownload.download`
|
A class representing a download task created by `RNBackgroundDownloader.download`
|
||||||
|
|
||||||
### `Members`
|
### `Members`
|
||||||
| Name | Type | Info |
|
| Name | Type | Info |
|
||||||
| -------------- | ------ | ---------------------------------------------------------------------------------------------------- |
|
| -------------- | ------ | ---------------------------------------------------------------------------------------------------- |
|
||||||
| `id` | String | The id you gave the task when calling `RNBackgroundDownload.download` |
|
| `id` | String | The id you gave the task when calling `RNBackgroundDownloader.download` |
|
||||||
| `percent` | Number | The current percent of completion of the task between 0 and 1 |
|
| `percent` | Number | The current percent of completion of the task between 0 and 1 |
|
||||||
| `bytesWritten` | Number | The number of bytes currently written by the task |
|
| `bytesWritten` | Number | The number of bytes currently written by the task |
|
||||||
| `totalBytes` | Number | The number bytes expected to be written by this task or more plainly, the file size being downloaded |
|
| `totalBytes` | Number | The number bytes expected to be written by this task or more plainly, the file size being downloaded |
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
public class RNBackgroundDownloadModule extends ReactContextBaseJavaModule implements FetchListener {
|
public class RNBackgroundDownloaderModule extends ReactContextBaseJavaModule implements FetchListener {
|
||||||
|
|
||||||
private static final int TASK_RUNNING = 0;
|
private static final int TASK_RUNNING = 0;
|
||||||
private static final int TASK_SUSPENDED = 1;
|
private static final int TASK_SUSPENDED = 1;
|
||||||
@@ -64,11 +64,11 @@ public class RNBackgroundDownloadModule extends ReactContextBaseJavaModule imple
|
|||||||
private Date lastProgressReport = new Date();
|
private Date lastProgressReport = new Date();
|
||||||
private HashMap<String, WritableMap> progressReports = new HashMap<>();
|
private HashMap<String, WritableMap> progressReports = new HashMap<>();
|
||||||
|
|
||||||
public RNBackgroundDownloadModule(ReactApplicationContext reactContext) {
|
public RNBackgroundDownloaderModule(ReactApplicationContext reactContext) {
|
||||||
super(reactContext);
|
super(reactContext);
|
||||||
|
|
||||||
loadConfigMap();
|
loadConfigMap();
|
||||||
fetch = new Fetch.Builder(this.getReactApplicationContext(), "RNBackgroundDownload")
|
fetch = new Fetch.Builder(this.getReactApplicationContext(), "RNBackgroundDownloader")
|
||||||
.setDownloadConcurrentLimit(4)
|
.setDownloadConcurrentLimit(4)
|
||||||
.build();
|
.build();
|
||||||
fetch.addListener(this);
|
fetch.addListener(this);
|
||||||
@@ -81,7 +81,7 @@ public class RNBackgroundDownloadModule extends ReactContextBaseJavaModule imple
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "RNBackgroundDownload";
|
return "RNBackgroundDownloader";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ import com.facebook.react.bridge.NativeModule;
|
|||||||
import com.facebook.react.bridge.ReactApplicationContext;
|
import com.facebook.react.bridge.ReactApplicationContext;
|
||||||
import com.facebook.react.uimanager.ViewManager;
|
import com.facebook.react.uimanager.ViewManager;
|
||||||
import com.facebook.react.bridge.JavaScriptModule;
|
import com.facebook.react.bridge.JavaScriptModule;
|
||||||
public class RNBackgroundDownloadPackage implements ReactPackage {
|
public class RNBackgroundDownloaderPackage implements ReactPackage {
|
||||||
@Override
|
@Override
|
||||||
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
|
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
|
||||||
return Arrays.<NativeModule>asList(new RNBackgroundDownloadModule(reactContext));
|
return Arrays.<NativeModule>asList(new RNBackgroundDownloaderModule(reactContext));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { NativeModules, NativeEventEmitter } from 'react-native';
|
import { NativeModules, NativeEventEmitter } from 'react-native';
|
||||||
const { RNBackgroundDownload } = NativeModules;
|
const { RNBackgroundDownloader } = NativeModules;
|
||||||
const RNBackgroundDownloadEmitter = new NativeEventEmitter(RNBackgroundDownload);
|
const RNBackgroundDownloaderEmitter = new NativeEventEmitter(RNBackgroundDownloader);
|
||||||
import DownloadTask from './lib/downloadTask';
|
import DownloadTask from './lib/downloadTask';
|
||||||
|
|
||||||
const tasksMap = new Map();
|
const tasksMap = new Map();
|
||||||
|
|
||||||
RNBackgroundDownloadEmitter.addListener('downloadProgress', events => {
|
RNBackgroundDownloaderEmitter.addListener('downloadProgress', events => {
|
||||||
for (let event of events) {
|
for (let event of events) {
|
||||||
let task = tasksMap.get(event.id);
|
let task = tasksMap.get(event.id);
|
||||||
if (task) {
|
if (task) {
|
||||||
@@ -14,7 +14,7 @@ RNBackgroundDownloadEmitter.addListener('downloadProgress', events => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
RNBackgroundDownloadEmitter.addListener('downloadComplete', event => {
|
RNBackgroundDownloaderEmitter.addListener('downloadComplete', event => {
|
||||||
let task = tasksMap.get(event.id);
|
let task = tasksMap.get(event.id);
|
||||||
if (task) {
|
if (task) {
|
||||||
task._onDone(event.location);
|
task._onDone(event.location);
|
||||||
@@ -22,7 +22,7 @@ RNBackgroundDownloadEmitter.addListener('downloadComplete', event => {
|
|||||||
tasksMap.delete(event.id);
|
tasksMap.delete(event.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
RNBackgroundDownloadEmitter.addListener('downloadFailed', event => {
|
RNBackgroundDownloaderEmitter.addListener('downloadFailed', event => {
|
||||||
let task = tasksMap.get(event.id);
|
let task = tasksMap.get(event.id);
|
||||||
if (task) {
|
if (task) {
|
||||||
task._onError(event.error);
|
task._onError(event.error);
|
||||||
@@ -30,7 +30,7 @@ RNBackgroundDownloadEmitter.addListener('downloadFailed', event => {
|
|||||||
tasksMap.delete(event.id);
|
tasksMap.delete(event.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
RNBackgroundDownloadEmitter.addListener('downloadBegin', event => {
|
RNBackgroundDownloaderEmitter.addListener('downloadBegin', event => {
|
||||||
let task = tasksMap.get(event.id);
|
let task = tasksMap.get(event.id);
|
||||||
if (task) {
|
if (task) {
|
||||||
task._onBegin(event.expectedBytes);
|
task._onBegin(event.expectedBytes);
|
||||||
@@ -38,18 +38,18 @@ RNBackgroundDownloadEmitter.addListener('downloadBegin', event => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
export function checkForExistingDownloads() {
|
export function checkForExistingDownloads() {
|
||||||
return RNBackgroundDownload.checkForExistingDownloads()
|
return RNBackgroundDownloader.checkForExistingDownloads()
|
||||||
.then(foundTasks => {
|
.then(foundTasks => {
|
||||||
return foundTasks.map(taskInfo => {
|
return foundTasks.map(taskInfo => {
|
||||||
let task = new DownloadTask(taskInfo);
|
let task = new DownloadTask(taskInfo);
|
||||||
if (taskInfo.state === RNBackgroundDownload.TaskRunning) {
|
if (taskInfo.state === RNBackgroundDownloader.TaskRunning) {
|
||||||
task.state = 'DOWNLOADING';
|
task.state = 'DOWNLOADING';
|
||||||
} else if (taskInfo.state === RNBackgroundDownload.TaskSuspended) {
|
} else if (taskInfo.state === RNBackgroundDownloader.TaskSuspended) {
|
||||||
task.state = 'PAUSED';
|
task.state = 'PAUSED';
|
||||||
} else if (taskInfo.state === RNBackgroundDownload.TaskCanceling) {
|
} else if (taskInfo.state === RNBackgroundDownloader.TaskCanceling) {
|
||||||
task.stop();
|
task.stop();
|
||||||
return null;
|
return null;
|
||||||
} else if (taskInfo.state === RNBackgroundDownload.TaskCompleted) {
|
} else if (taskInfo.state === RNBackgroundDownloader.TaskCompleted) {
|
||||||
if (taskInfo.bytesWritten === taskInfo.totalBytes) {
|
if (taskInfo.bytesWritten === taskInfo.totalBytes) {
|
||||||
task.state = 'DONE';
|
task.state = 'DONE';
|
||||||
} else {
|
} else {
|
||||||
@@ -65,27 +65,27 @@ export function checkForExistingDownloads() {
|
|||||||
|
|
||||||
export function download(options) {
|
export function download(options) {
|
||||||
if (!options.id || !options.url || !options.destination) {
|
if (!options.id || !options.url || !options.destination) {
|
||||||
throw new Error('[RNBackgroundDownload] id, url and destination are required');
|
throw new Error('[RNBackgroundDownloader] id, url and destination are required');
|
||||||
}
|
}
|
||||||
RNBackgroundDownload.download(options);
|
RNBackgroundDownloader.download(options);
|
||||||
let task = new DownloadTask(options.id);
|
let task = new DownloadTask(options.id);
|
||||||
tasksMap.set(options.id, task);
|
tasksMap.set(options.id, task);
|
||||||
return task;
|
return task;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const directories = {
|
export const directories = {
|
||||||
documents: RNBackgroundDownload.documents
|
documents: RNBackgroundDownloader.documents
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Network = {
|
export const Network = {
|
||||||
WIFI_ONLY: RNBackgroundDownload.OnlyWifi,
|
WIFI_ONLY: RNBackgroundDownloader.OnlyWifi,
|
||||||
ALL: RNBackgroundDownload.AllNetworks
|
ALL: RNBackgroundDownloader.AllNetworks
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Priority = {
|
export const Priority = {
|
||||||
HIGH: RNBackgroundDownload.PriorityHigh,
|
HIGH: RNBackgroundDownloader.PriorityHigh,
|
||||||
MEDIUM: RNBackgroundDownload.PriorityNormal,
|
MEDIUM: RNBackgroundDownloader.PriorityNormal,
|
||||||
LOW: RNBackgroundDownload.PriorityLow
|
LOW: RNBackgroundDownloader.PriorityLow
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
typedef void (^CompletionHandler)();
|
typedef void (^CompletionHandler)();
|
||||||
|
|
||||||
@interface RNBackgroundDownload : RCTEventEmitter <RCTBridgeModule, NSURLSessionDelegate, NSURLSessionDownloadDelegate>
|
@interface RNBackgroundDownloader : RCTEventEmitter <RCTBridgeModule, NSURLSessionDelegate, NSURLSessionDownloadDelegate>
|
||||||
|
|
||||||
+ (void)setCompletionHandlerWithIdentifier: (NSString *)identifier completionHandler: (CompletionHandler)completionHandler;
|
+ (void)setCompletionHandlerWithIdentifier: (NSString *)identifier completionHandler: (CompletionHandler)completionHandler;
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
static CompletionHandler storedCompletionHandler;
|
static CompletionHandler storedCompletionHandler;
|
||||||
|
|
||||||
@implementation RNBackgroundDownload {
|
@implementation RNBackgroundDownloader {
|
||||||
NSURLSession *urlSession;
|
NSURLSession *urlSession;
|
||||||
NSURLSessionConfiguration *sessionConfig;
|
NSURLSessionConfiguration *sessionConfig;
|
||||||
NSMutableDictionary<NSString *, RNBGDTaskConfig *> *urlToConfigMap;
|
NSMutableDictionary<NSString *, RNBGDTaskConfig *> *urlToConfigMap;
|
||||||
+18
-18
@@ -7,7 +7,7 @@
|
|||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
B3E7B58A1CC2AC0600A0062D /* RNBackgroundDownload.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNBackgroundDownload.m */; };
|
B3E7B58A1CC2AC0600A0062D /* RNBackgroundDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNBackgroundDownloader.m */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXCopyFilesBuildPhase section */
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
@@ -23,10 +23,10 @@
|
|||||||
/* End PBXCopyFilesBuildPhase section */
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
134814201AA4EA6300B7C361 /* libRNBackgroundDownload.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNBackgroundDownload.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
134814201AA4EA6300B7C361 /* libRNBackgroundDownloader.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNBackgroundDownloader.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
565BF70F208F2C7C00F66231 /* RNBGDTaskConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNBGDTaskConfig.h; sourceTree = "<group>"; };
|
565BF70F208F2C7C00F66231 /* RNBGDTaskConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNBGDTaskConfig.h; sourceTree = "<group>"; };
|
||||||
B3E7B5881CC2AC0600A0062D /* RNBackgroundDownload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNBackgroundDownload.h; sourceTree = "<group>"; };
|
B3E7B5881CC2AC0600A0062D /* RNBackgroundDownloader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNBackgroundDownloader.h; sourceTree = "<group>"; };
|
||||||
B3E7B5891CC2AC0600A0062D /* RNBackgroundDownload.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNBackgroundDownload.m; sourceTree = "<group>"; };
|
B3E7B5891CC2AC0600A0062D /* RNBackgroundDownloader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNBackgroundDownloader.m; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
134814211AA4EA7D00B7C361 /* Products */ = {
|
134814211AA4EA7D00B7C361 /* Products */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
134814201AA4EA6300B7C361 /* libRNBackgroundDownload.a */,
|
134814201AA4EA6300B7C361 /* libRNBackgroundDownloader.a */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -52,8 +52,8 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
565BF70F208F2C7C00F66231 /* RNBGDTaskConfig.h */,
|
565BF70F208F2C7C00F66231 /* RNBGDTaskConfig.h */,
|
||||||
B3E7B5881CC2AC0600A0062D /* RNBackgroundDownload.h */,
|
B3E7B5881CC2AC0600A0062D /* RNBackgroundDownloader.h */,
|
||||||
B3E7B5891CC2AC0600A0062D /* RNBackgroundDownload.m */,
|
B3E7B5891CC2AC0600A0062D /* RNBackgroundDownloader.m */,
|
||||||
134814211AA4EA7D00B7C361 /* Products */,
|
134814211AA4EA7D00B7C361 /* Products */,
|
||||||
);
|
);
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -61,9 +61,9 @@
|
|||||||
/* End PBXGroup section */
|
/* End PBXGroup section */
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
/* Begin PBXNativeTarget section */
|
||||||
58B511DA1A9E6C8500147676 /* RNBackgroundDownload */ = {
|
58B511DA1A9E6C8500147676 /* RNBackgroundDownloader */ = {
|
||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNBackgroundDownload" */;
|
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNBackgroundDownloader" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
58B511D71A9E6C8500147676 /* Sources */,
|
58B511D71A9E6C8500147676 /* Sources */,
|
||||||
58B511D81A9E6C8500147676 /* Frameworks */,
|
58B511D81A9E6C8500147676 /* Frameworks */,
|
||||||
@@ -73,9 +73,9 @@
|
|||||||
);
|
);
|
||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = RNBackgroundDownload;
|
name = RNBackgroundDownloader;
|
||||||
productName = RCTDataManager;
|
productName = RCTDataManager;
|
||||||
productReference = 134814201AA4EA6300B7C361 /* libRNBackgroundDownload.a */;
|
productReference = 134814201AA4EA6300B7C361 /* libRNBackgroundDownloader.a */;
|
||||||
productType = "com.apple.product-type.library.static";
|
productType = "com.apple.product-type.library.static";
|
||||||
};
|
};
|
||||||
/* End PBXNativeTarget section */
|
/* End PBXNativeTarget section */
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNBackgroundDownload" */;
|
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNBackgroundDownloader" */;
|
||||||
compatibilityVersion = "Xcode 3.2";
|
compatibilityVersion = "Xcode 3.2";
|
||||||
developmentRegion = English;
|
developmentRegion = English;
|
||||||
hasScannedForEncodings = 0;
|
hasScannedForEncodings = 0;
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
projectDirPath = "";
|
projectDirPath = "";
|
||||||
projectRoot = "";
|
projectRoot = "";
|
||||||
targets = (
|
targets = (
|
||||||
58B511DA1A9E6C8500147676 /* RNBackgroundDownload */,
|
58B511DA1A9E6C8500147676 /* RNBackgroundDownloader */,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
/* End PBXProject section */
|
/* End PBXProject section */
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
B3E7B58A1CC2AC0600A0062D /* RNBackgroundDownload.m in Sources */,
|
B3E7B58A1CC2AC0600A0062D /* RNBackgroundDownloader.m in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -206,7 +206,7 @@
|
|||||||
);
|
);
|
||||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||||
OTHER_LDFLAGS = "-ObjC";
|
OTHER_LDFLAGS = "-ObjC";
|
||||||
PRODUCT_NAME = RNBackgroundDownload;
|
PRODUCT_NAME = RNBackgroundDownloader;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
@@ -222,7 +222,7 @@
|
|||||||
);
|
);
|
||||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||||
OTHER_LDFLAGS = "-ObjC";
|
OTHER_LDFLAGS = "-ObjC";
|
||||||
PRODUCT_NAME = RNBackgroundDownload;
|
PRODUCT_NAME = RNBackgroundDownloader;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
@@ -230,7 +230,7 @@
|
|||||||
/* End XCBuildConfiguration section */
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
/* Begin XCConfigurationList section */
|
/* Begin XCConfigurationList section */
|
||||||
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNBackgroundDownload" */ = {
|
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNBackgroundDownloader" */ = {
|
||||||
isa = XCConfigurationList;
|
isa = XCConfigurationList;
|
||||||
buildConfigurations = (
|
buildConfigurations = (
|
||||||
58B511ED1A9E6C8500147676 /* Debug */,
|
58B511ED1A9E6C8500147676 /* Debug */,
|
||||||
@@ -239,7 +239,7 @@
|
|||||||
defaultConfigurationIsVisible = 0;
|
defaultConfigurationIsVisible = 0;
|
||||||
defaultConfigurationName = Release;
|
defaultConfigurationName = Release;
|
||||||
};
|
};
|
||||||
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNBackgroundDownload" */ = {
|
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNBackgroundDownloader" */ = {
|
||||||
isa = XCConfigurationList;
|
isa = XCConfigurationList;
|
||||||
buildConfigurations = (
|
buildConfigurations = (
|
||||||
58B511F01A9E6C8500147676 /* Debug */,
|
58B511F01A9E6C8500147676 /* Debug */,
|
||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "react-native-background-download",
|
"name": "react-native-background-downloader",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"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.",
|
"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.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/EkoLabs/react-native-background-download.git"
|
"url": "https://github.com/EkoLabs/react-native-background-downloader.git"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react-native",
|
"react-native",
|
||||||
|
|||||||
Reference in New Issue
Block a user