@kesha-antonov/react-native-background-downloader 2.7.1 → 2.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +70 -43
- package/android/build.gradle +10 -8
- package/android/src/main/AndroidManifest.xml +0 -1
- package/android/src/main/java/com/eko/RNBackgroundDownloaderModule.java +30 -14
- package/android/src/main/java/com/eko/RNBackgroundDownloaderPackage.java +1 -1
- package/index.d.ts +7 -0
- package/index.ts +7 -1
- package/ios/RNBackgroundDownloader.m +19 -15
- package/ios/RNBackgroundDownloader.xcodeproj/project.pbxproj +221 -221
- package/package.json +13 -13
package/LICENSE
CHANGED
|
@@ -10,4 +10,4 @@ use this file except in compliance with the License. You may obtain a copy of th
|
|
|
10
10
|
Unless required by applicable law or agreed to in writing, software
|
|
11
11
|
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
12
12
|
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
13
|
-
License for the specific language governing permissions and limitations under the License.
|
|
13
|
+
License for the specific language governing permissions and limitations under the License.
|
package/README.md
CHANGED
|
@@ -67,14 +67,14 @@ For anything **`< 0.60`** run the following link command
|
|
|
67
67
|
- Add `import com.eko.RNBackgroundDownloaderPackage;` to the imports at the top of the file
|
|
68
68
|
- Add `new RNBackgroundDownloaderPackage()` to the list returned by the `getPackages()` method
|
|
69
69
|
2. Append the following lines to `android/settings.gradle`:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
```
|
|
71
|
+
include ':react-native-background-downloader'
|
|
72
|
+
project(':react-native-background-downloader').projectDir = new File(rootProject.projectDir, '../node_modules/@kesha-antonov/react-native-background-downloader/android')
|
|
73
|
+
```
|
|
74
74
|
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
|
|
75
|
-
|
|
75
|
+
```
|
|
76
76
|
compile project(':react-native-background-downloader')
|
|
77
|
-
|
|
77
|
+
```
|
|
78
78
|
</details>
|
|
79
79
|
|
|
80
80
|
### iOS - Extra Mandatory Step
|
|
@@ -105,16 +105,16 @@ import { download, completeHandler } from '@kesha-antonov/react-native-backgroun
|
|
|
105
105
|
const jobId = 'file123'
|
|
106
106
|
|
|
107
107
|
let task = download({
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
id: jobId,
|
|
109
|
+
url: 'https://link-to-very.large/file.zip',
|
|
110
|
+
destination: `${RNBackgroundDownloader.directories.documents}/file.zip`,
|
|
111
|
+
metadata: {}
|
|
112
112
|
}).begin(({ expectedBytes, headers }) => {
|
|
113
|
-
|
|
113
|
+
console.log(`Going to download ${expectedBytes} bytes!`)
|
|
114
114
|
}).progress(percent => {
|
|
115
|
-
|
|
115
|
+
console.log(`Downloaded: ${percent * 100}%`)
|
|
116
116
|
}).done(() => {
|
|
117
|
-
|
|
117
|
+
console.log('Download is done!')
|
|
118
118
|
|
|
119
119
|
// PROCESS YOUR STUFF
|
|
120
120
|
|
|
@@ -122,7 +122,7 @@ let task = download({
|
|
|
122
122
|
if (Platform.OS === 'ios')
|
|
123
123
|
completeHandler(jobId)
|
|
124
124
|
}).error(error => {
|
|
125
|
-
|
|
125
|
+
console.log('Download canceled due to error: ', error);
|
|
126
126
|
})
|
|
127
127
|
|
|
128
128
|
// Pause the task
|
|
@@ -148,14 +148,14 @@ import RNBackgroundDownloader from '@kesha-antonov/react-native-background-downl
|
|
|
148
148
|
|
|
149
149
|
let lostTasks = await RNBackgroundDownloader.checkForExistingDownloads()
|
|
150
150
|
for (let task of lostTasks) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
151
|
+
console.log(`Task ${task.id} was found!`)
|
|
152
|
+
task.progress(percent => {
|
|
153
|
+
console.log(`Downloaded: ${percent * 100}%`)
|
|
154
|
+
}).done(() => {
|
|
155
|
+
console.log('Download is done!')
|
|
156
|
+
}).error(error => {
|
|
157
|
+
console.log('Download canceled due to error: ', error)
|
|
158
|
+
})
|
|
159
159
|
}
|
|
160
160
|
```
|
|
161
161
|
|
|
@@ -167,7 +167,7 @@ If you need to send custom headers with your download request, you can do in it
|
|
|
167
167
|
1) Globally using `RNBackgroundDownloader.setHeaders()`:
|
|
168
168
|
```javascript
|
|
169
169
|
RNBackgroundDownloader.setHeaders({
|
|
170
|
-
|
|
170
|
+
Authorization: 'Bearer 2we$@$@Ddd223'
|
|
171
171
|
})
|
|
172
172
|
```
|
|
173
173
|
This way, all downloads with have the given headers.
|
|
@@ -175,20 +175,20 @@ This way, all downloads with have the given headers.
|
|
|
175
175
|
2) Per download by passing a headers object in the options of `RNBackgroundDownloader.download()`:
|
|
176
176
|
```javascript
|
|
177
177
|
let task = RNBackgroundDownloader.download({
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
178
|
+
id: 'file123',
|
|
179
|
+
url: 'https://link-to-very.large/file.zip'
|
|
180
|
+
destination: `${RNBackgroundDownloader.directories.documents}/file.zip`,
|
|
181
|
+
headers: {
|
|
182
|
+
Authorization: 'Bearer 2we$@$@Ddd223'
|
|
183
|
+
}
|
|
184
184
|
}).begin(({ expectedBytes, headers }) => {
|
|
185
|
-
|
|
185
|
+
console.log(`Going to download ${expectedBytes} bytes!`)
|
|
186
186
|
}).progress(percent => {
|
|
187
|
-
|
|
187
|
+
console.log(`Downloaded: ${percent * 100}%`)
|
|
188
188
|
}).done(() => {
|
|
189
|
-
|
|
189
|
+
console.log('Download is done!')
|
|
190
190
|
}).error(error => {
|
|
191
|
-
|
|
191
|
+
console.log('Download canceled due to error: ', error)
|
|
192
192
|
})
|
|
193
193
|
```
|
|
194
194
|
Headers given in the `download` function are **merged** with the ones given in `setHeaders`.
|
|
@@ -221,7 +221,9 @@ An object containing options properties
|
|
|
221
221
|
|
|
222
222
|
### `checkForExistingDownloads()`
|
|
223
223
|
|
|
224
|
-
Checks for downloads that ran in background while you app was terminated.
|
|
224
|
+
Checks for downloads that ran in background while you app was terminated. And also forces them to resume downloads.
|
|
225
|
+
|
|
226
|
+
Recommended to run at the init stage of the app.
|
|
225
227
|
|
|
226
228
|
**returns**
|
|
227
229
|
|
|
@@ -264,7 +266,7 @@ Either stop all tasks:
|
|
|
264
266
|
```javascript
|
|
265
267
|
const tasks = await checkForExistingDownloads()
|
|
266
268
|
for (const task of tasks)
|
|
267
|
-
|
|
269
|
+
task.stop()
|
|
268
270
|
```
|
|
269
271
|
|
|
270
272
|
Or re-attach them:
|
|
@@ -272,11 +274,11 @@ Or re-attach them:
|
|
|
272
274
|
```javascript
|
|
273
275
|
const tasks = await checkForExistingDownloads()
|
|
274
276
|
for (const task of tasks) {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
277
|
+
task.pause()
|
|
278
|
+
//
|
|
279
|
+
// YOUR LOGIC OF RE-ATTACHING DOWLOADS TO YOUR STUFF
|
|
280
|
+
// ...
|
|
281
|
+
//
|
|
280
282
|
}
|
|
281
283
|
```
|
|
282
284
|
|
|
@@ -287,10 +289,10 @@ for (const task of tasks) {
|
|
|
287
289
|
```javascript
|
|
288
290
|
|
|
289
291
|
function handleAppStateChange (appState) {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
+
if (appState !== 'active')
|
|
293
|
+
return
|
|
292
294
|
|
|
293
|
-
|
|
295
|
+
ensureDownloadsAreRunning()
|
|
294
296
|
}
|
|
295
297
|
|
|
296
298
|
const appStateChangeListener = AppState.addEventListener('change', handleAppStateChange)
|
|
@@ -319,6 +321,31 @@ Resumes a pause download
|
|
|
319
321
|
### `stop()`
|
|
320
322
|
Stops the download for good and removes the file that was written so far
|
|
321
323
|
|
|
324
|
+
### `initDownloader(options)`
|
|
325
|
+
|
|
326
|
+
Init android downloader with options
|
|
327
|
+
|
|
328
|
+
**options**
|
|
329
|
+
|
|
330
|
+
An object containing options properties
|
|
331
|
+
|
|
332
|
+
| Property | Type | Required | Platforms | Info |
|
|
333
|
+
| ------------- | ------------------------------------------------ | :------: | :-------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
334
|
+
| `type` | String | | Android | Downloader type: 'parallel' or 'sequential'. Default: 'sequential'. 'parallel' seems to cause lots of ANRs, so be careful |
|
|
335
|
+
|
|
336
|
+
**Usage**
|
|
337
|
+
|
|
338
|
+
```javascript
|
|
339
|
+
import { initDownloader } from '@kesha-antonov/react-native-background-downloader'
|
|
340
|
+
|
|
341
|
+
...
|
|
342
|
+
// SOMEWHERE AT APP STARTUP
|
|
343
|
+
|
|
344
|
+
useEffect(() => {
|
|
345
|
+
initDownloader({ type: 'parallel' })
|
|
346
|
+
}, [])
|
|
347
|
+
```
|
|
348
|
+
|
|
322
349
|
## Constants
|
|
323
350
|
|
|
324
351
|
### directories
|
package/android/build.gradle
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
|
|
3
|
+
def useAndroidX = (project.hasProperty('android.useAndroidX')) ? project.property('android.useAndroidX') : false
|
|
4
|
+
|
|
3
5
|
def safeExtGet(prop, fallback) {
|
|
4
6
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
5
7
|
}
|
|
6
8
|
|
|
7
9
|
android {
|
|
8
|
-
compileSdkVersion safeExtGet(
|
|
10
|
+
compileSdkVersion safeExtGet('compileSdkVersion', 33)
|
|
9
11
|
|
|
10
12
|
defaultConfig {
|
|
11
13
|
minSdkVersion safeExtGet('minSdkVersion', 21)
|
|
12
14
|
targetSdkVersion safeExtGet('targetSdkVersion', 33)
|
|
13
15
|
versionCode 1
|
|
14
|
-
versionName
|
|
16
|
+
versionName '1.0'
|
|
15
17
|
ndk {
|
|
16
|
-
abiFilters
|
|
18
|
+
abiFilters 'armeabi-v7a', 'x86'
|
|
17
19
|
}
|
|
18
20
|
}
|
|
19
21
|
}
|
|
@@ -21,11 +23,11 @@ android {
|
|
|
21
23
|
dependencies {
|
|
22
24
|
//noinspection GradleDynamicVersion
|
|
23
25
|
implementation 'com.facebook.react:react-native:+'
|
|
24
|
-
if (
|
|
25
|
-
api
|
|
26
|
-
implementation
|
|
26
|
+
if (useAndroidX) {
|
|
27
|
+
api 'com.github.tonyofrancis.Fetch:xfetch2:3.1.6'
|
|
28
|
+
implementation 'com.github.tonyofrancis.Fetch:xfetch2okhttp:3.1.6'
|
|
27
29
|
} else {
|
|
28
|
-
api
|
|
29
|
-
implementation
|
|
30
|
+
api 'com.tonyodev.fetch2:fetch2:3.0.12'
|
|
31
|
+
implementation 'com.tonyodev.fetch2okhttp:fetch2okhttp:3.0.12'
|
|
30
32
|
}
|
|
31
33
|
}
|
|
@@ -8,6 +8,7 @@ import com.facebook.react.bridge.Promise;
|
|
|
8
8
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
9
9
|
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
10
10
|
import com.facebook.react.bridge.ReactMethod;
|
|
11
|
+
import com.facebook.react.bridge.Arguments;
|
|
11
12
|
import com.facebook.react.bridge.ReadableMap;
|
|
12
13
|
import com.facebook.react.bridge.ReadableMapKeySetIterator;
|
|
13
14
|
import com.facebook.react.bridge.WritableArray;
|
|
@@ -87,19 +88,8 @@ public class RNBackgroundDownloaderModule extends ReactContextBaseJavaModule imp
|
|
|
87
88
|
public RNBackgroundDownloaderModule(ReactApplicationContext reactContext) {
|
|
88
89
|
super(reactContext);
|
|
89
90
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
Downloader.FileDownloaderType.PARALLEL);
|
|
93
|
-
|
|
94
|
-
loadConfigMap();
|
|
95
|
-
FetchConfiguration fetchConfiguration = new FetchConfiguration.Builder(this.getReactApplicationContext())
|
|
96
|
-
.setDownloadConcurrentLimit(4)
|
|
97
|
-
.setHttpDownloader(okHttpDownloader)
|
|
98
|
-
.enableRetryOnNetworkGain(true)
|
|
99
|
-
.setHttpDownloader(new HttpUrlConnectionDownloader(Downloader.FileDownloaderType.PARALLEL))
|
|
100
|
-
.build();
|
|
101
|
-
fetch = Fetch.Impl.getInstance(fetchConfiguration);
|
|
102
|
-
fetch.addListener(this);
|
|
91
|
+
ReadableMap emptyMap = Arguments.createMap();
|
|
92
|
+
this.initDownloader(emptyMap);
|
|
103
93
|
}
|
|
104
94
|
|
|
105
95
|
@Override
|
|
@@ -152,7 +142,33 @@ public class RNBackgroundDownloaderModule extends ReactContextBaseJavaModule imp
|
|
|
152
142
|
constants.put("PriorityLow", Priority.LOW.getValue());
|
|
153
143
|
constants.put("OnlyWifi", NetworkType.WIFI_ONLY.getValue());
|
|
154
144
|
constants.put("AllNetworks", NetworkType.ALL.getValue());
|
|
155
|
-
return
|
|
145
|
+
return constants;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@ReactMethod
|
|
149
|
+
public void initDownloader(ReadableMap options) {
|
|
150
|
+
if (fetch != null) {
|
|
151
|
+
fetch.close();
|
|
152
|
+
fetch = null;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
Downloader.FileDownloaderType downloaderType = options.getString("type") == "parallel"
|
|
156
|
+
? Downloader.FileDownloaderType.PARALLEL
|
|
157
|
+
: Downloader.FileDownloaderType.SEQUENTIAL;
|
|
158
|
+
|
|
159
|
+
OkHttpClient okHttpClient = new OkHttpClient.Builder().build();
|
|
160
|
+
final Downloader okHttpDownloader = new OkHttpDownloader(okHttpClient,
|
|
161
|
+
downloaderType);
|
|
162
|
+
|
|
163
|
+
loadConfigMap();
|
|
164
|
+
FetchConfiguration fetchConfiguration = new FetchConfiguration.Builder(this.getReactApplicationContext())
|
|
165
|
+
.setDownloadConcurrentLimit(4)
|
|
166
|
+
.setHttpDownloader(okHttpDownloader)
|
|
167
|
+
.enableRetryOnNetworkGain(true)
|
|
168
|
+
.setHttpDownloader(new HttpUrlConnectionDownloader(downloaderType))
|
|
169
|
+
.build();
|
|
170
|
+
fetch = Fetch.Impl.getInstance(fetchConfiguration);
|
|
171
|
+
fetch.addListener(this);
|
|
156
172
|
}
|
|
157
173
|
|
|
158
174
|
private void removeFromMaps(int requestId) {
|
package/index.d.ts
CHANGED
|
@@ -76,6 +76,11 @@ export interface DownloadTask {
|
|
|
76
76
|
export type CheckForExistingDownloads = () => Promise<DownloadTask[]>;
|
|
77
77
|
export type EnsureDownloadsAreRunning = () => Promise<void>;
|
|
78
78
|
|
|
79
|
+
export interface InitDownloaderOptions {
|
|
80
|
+
type?: 'parallel' | 'sequential' | null;
|
|
81
|
+
}
|
|
82
|
+
export type InitDownloader = (options: InitDownloaderOptions) => undefined;
|
|
83
|
+
|
|
79
84
|
export interface DownloadOption {
|
|
80
85
|
id: string;
|
|
81
86
|
url: string;
|
|
@@ -104,6 +109,7 @@ export interface Priority {
|
|
|
104
109
|
export const setHeaders: SetHeaders;
|
|
105
110
|
export const checkForExistingDownloads: CheckForExistingDownloads;
|
|
106
111
|
export const ensureDownloadsAreRunning: EnsureDownloadsAreRunning;
|
|
112
|
+
export const initDownloader: InitDownloader;
|
|
107
113
|
export const download: Download;
|
|
108
114
|
export const completeHandler: CompleteHandler;
|
|
109
115
|
export const directories: Directories;
|
|
@@ -112,6 +118,7 @@ export const Priority: Priority;
|
|
|
112
118
|
|
|
113
119
|
export interface RNBackgroundDownloader {
|
|
114
120
|
setHeaders: SetHeaders;
|
|
121
|
+
initDownloader: InitDownloader;
|
|
115
122
|
checkForExistingDownloads: CheckForExistingDownloads;
|
|
116
123
|
ensureDownloadsAreRunning: EnsureDownloadsAreRunning;
|
|
117
124
|
download: Download;
|
package/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NativeModules, NativeEventEmitter } from 'react-native'
|
|
1
|
+
import { NativeModules, NativeEventEmitter, Platform } from 'react-native'
|
|
2
2
|
import DownloadTask from './lib/DownloadTask'
|
|
3
3
|
|
|
4
4
|
const { RNBackgroundDownloader } = NativeModules
|
|
@@ -40,6 +40,11 @@ export function setHeaders (h = {}) {
|
|
|
40
40
|
headers = h
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
export function initDownloader (options = {}) {
|
|
44
|
+
if (Platform.OS === 'android')
|
|
45
|
+
RNBackgroundDownloader.initDownloader(options)
|
|
46
|
+
}
|
|
47
|
+
|
|
43
48
|
export function checkForExistingDownloads () {
|
|
44
49
|
return RNBackgroundDownloader.checkForExistingDownloads()
|
|
45
50
|
.then(foundTasks => {
|
|
@@ -129,6 +134,7 @@ export const Priority = {
|
|
|
129
134
|
}
|
|
130
135
|
|
|
131
136
|
export default {
|
|
137
|
+
initDownloader,
|
|
132
138
|
download,
|
|
133
139
|
checkForExistingDownloads,
|
|
134
140
|
ensureDownloadsAreRunning,
|
|
@@ -111,18 +111,14 @@ RCT_EXPORT_MODULE();
|
|
|
111
111
|
|
|
112
112
|
// NOTE: FIXES HANGING DOWNLOADS WHEN GOING TO BG
|
|
113
113
|
- (void) resumeTasks:(NSNotification *) note {
|
|
114
|
-
NSLog(@"[RNBackgroundDownloader] - [resumeTasks]
|
|
114
|
+
NSLog(@"[RNBackgroundDownloader] - [resumeTasks]");
|
|
115
115
|
@synchronized (sharedLock) {
|
|
116
116
|
[urlSession getTasksWithCompletionHandler:^(NSArray<NSURLSessionDataTask *> * _Nonnull dataTasks, NSArray<NSURLSessionUploadTask *> * _Nonnull uploadTasks, NSArray<NSURLSessionDownloadTask *> * _Nonnull downloadTasks) {
|
|
117
|
-
NSLog(@"[RNBackgroundDownloader] - [resumeTasks] 2");
|
|
118
117
|
for (NSURLSessionDownloadTask *task in downloadTasks) {
|
|
119
|
-
NSLog(@"[RNBackgroundDownloader] - [resumeTasks] 3 - state - %@", [NSNumber numberWithInt:task.state]);
|
|
120
118
|
// running - 0
|
|
121
119
|
// suspended - 1
|
|
122
120
|
// canceling - 2
|
|
123
121
|
// completed - 3
|
|
124
|
-
NSLog(@"[RNBackgroundDownloader] - [resumeTasks] 4 - totalBytes - %@", [NSNumber numberWithInt:task.countOfBytesExpectedToReceive]);
|
|
125
|
-
NSLog(@"[RNBackgroundDownloader] - [resumeTasks] 5 - bytesWritten - %@", [NSNumber numberWithInt:task.countOfBytesReceived]);
|
|
126
122
|
|
|
127
123
|
if (task.state == NSURLSessionTaskStateRunning) {
|
|
128
124
|
[task suspend]; // PAUSE
|
|
@@ -276,8 +272,8 @@ RCT_EXPORT_METHOD(checkForExistingDownloads: (RCTPromiseResolveBlock)resolve rej
|
|
|
276
272
|
NSURLSessionDownloadTask __strong *task = foundTask;
|
|
277
273
|
RNBGDTaskConfig *taskConfig = taskToConfigMap[@(task.taskIdentifier)];
|
|
278
274
|
if (taskConfig) {
|
|
279
|
-
if (task.state == NSURLSessionTaskStateCompleted && task.countOfBytesReceived < task.countOfBytesExpectedToReceive) {
|
|
280
|
-
if (task.error && task.error.
|
|
275
|
+
if ((task.state == NSURLSessionTaskStateCompleted || task.state == NSURLSessionTaskStateSuspended) && task.countOfBytesReceived < task.countOfBytesExpectedToReceive) {
|
|
276
|
+
if (task.error && task.error.userInfo[NSURLSessionDownloadTaskResumeData] != nil) {
|
|
281
277
|
task = [urlSession downloadTaskWithResumeData:task.error.userInfo[NSURLSessionDownloadTaskResumeData]];
|
|
282
278
|
} else {
|
|
283
279
|
task = [urlSession downloadTaskWithURL:task.currentRequest.URL];
|
|
@@ -312,12 +308,12 @@ RCT_EXPORT_METHOD(completeHandler:(nonnull NSString *)jobId
|
|
|
312
308
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
313
309
|
{
|
|
314
310
|
NSLog(@"[RNBackgroundDownloader] - [completeHandlerIOS]");
|
|
315
|
-
|
|
316
|
-
|
|
311
|
+
[[NSOperationQueue mainQueue] addOperationWithBlock:^{
|
|
312
|
+
if (storedCompletionHandler) {
|
|
317
313
|
storedCompletionHandler();
|
|
318
314
|
storedCompletionHandler = nil;
|
|
319
|
-
}
|
|
320
|
-
}
|
|
315
|
+
}
|
|
316
|
+
}];
|
|
321
317
|
resolve(nil);
|
|
322
318
|
}
|
|
323
319
|
|
|
@@ -354,6 +350,7 @@ RCT_EXPORT_METHOD(completeHandler:(nonnull NSString *)jobId
|
|
|
354
350
|
@synchronized (sharedLock) {
|
|
355
351
|
RNBGDTaskConfig *taskCofig = taskToConfigMap[@(downloadTask.taskIdentifier)];
|
|
356
352
|
if (taskCofig != nil) {
|
|
353
|
+
// NSLog(@"[RNBackgroundDownloader] - [didWriteData] destination - %@", taskCofig.destination);
|
|
357
354
|
if (!taskCofig.reportedBegin) {
|
|
358
355
|
NSDictionary *responseHeaders = ((NSHTTPURLResponse *)downloadTask.response).allHeaderFields;
|
|
359
356
|
if (self.bridge) {
|
|
@@ -388,11 +385,18 @@ RCT_EXPORT_METHOD(completeHandler:(nonnull NSString *)jobId
|
|
|
388
385
|
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error {
|
|
389
386
|
NSLog(@"[RNBackgroundDownloader] - [didCompleteWithError]");
|
|
390
387
|
@synchronized (sharedLock) {
|
|
388
|
+
if (error == nil)
|
|
389
|
+
return;
|
|
390
|
+
|
|
391
391
|
RNBGDTaskConfig *taskCofig = taskToConfigMap[@(task.taskIdentifier)];
|
|
392
|
-
if (
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
392
|
+
if (taskCofig == nil)
|
|
393
|
+
return;
|
|
394
|
+
|
|
395
|
+
if (self.bridge) {
|
|
396
|
+
[self sendEventWithName:@"downloadFailed" body:@{@"id": taskCofig.id, @"error": [error localizedDescription]}];
|
|
397
|
+
}
|
|
398
|
+
// IF WE CAN'T RESUME TO DOWNLOAD LATER
|
|
399
|
+
if (error.userInfo[NSURLSessionDownloadTaskResumeData] == nil) {
|
|
396
400
|
[self removeTaskFromMap:task];
|
|
397
401
|
}
|
|
398
402
|
}
|
|
@@ -1,254 +1,254 @@
|
|
|
1
1
|
// !$*UTF8*$!
|
|
2
2
|
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
archiveVersion = 1;
|
|
4
|
+
classes = {
|
|
5
|
+
};
|
|
6
|
+
objectVersion = 46;
|
|
7
|
+
objects = {
|
|
8
8
|
|
|
9
9
|
/* Begin PBXBuildFile section */
|
|
10
|
-
|
|
10
|
+
B3E7B58A1CC2AC0600A0062D /* RNBackgroundDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNBackgroundDownloader.m */; };
|
|
11
11
|
/* End PBXBuildFile section */
|
|
12
12
|
|
|
13
13
|
/* Begin PBXCopyFilesBuildPhase section */
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
58B511D91A9E6C8500147676 /* CopyFiles */ = {
|
|
15
|
+
isa = PBXCopyFilesBuildPhase;
|
|
16
|
+
buildActionMask = 2147483647;
|
|
17
|
+
dstPath = "include/$(PRODUCT_NAME)";
|
|
18
|
+
dstSubfolderSpec = 16;
|
|
19
|
+
files = (
|
|
20
|
+
);
|
|
21
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
22
|
+
};
|
|
23
23
|
/* End PBXCopyFilesBuildPhase section */
|
|
24
24
|
|
|
25
25
|
/* Begin PBXFileReference section */
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
134814201AA4EA6300B7C361 /* libRNBackgroundDownloader.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNBackgroundDownloader.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
27
|
+
565BF70F208F2C7C00F66231 /* RNBGDTaskConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNBGDTaskConfig.h; sourceTree = "<group>"; };
|
|
28
|
+
B3E7B5881CC2AC0600A0062D /* RNBackgroundDownloader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNBackgroundDownloader.h; sourceTree = "<group>"; };
|
|
29
|
+
B3E7B5891CC2AC0600A0062D /* RNBackgroundDownloader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNBackgroundDownloader.m; sourceTree = "<group>"; };
|
|
30
30
|
/* End PBXFileReference section */
|
|
31
31
|
|
|
32
32
|
/* Begin PBXFrameworksBuildPhase section */
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
58B511D81A9E6C8500147676 /* Frameworks */ = {
|
|
34
|
+
isa = PBXFrameworksBuildPhase;
|
|
35
|
+
buildActionMask = 2147483647;
|
|
36
|
+
files = (
|
|
37
|
+
);
|
|
38
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
39
|
+
};
|
|
40
40
|
/* End PBXFrameworksBuildPhase section */
|
|
41
41
|
|
|
42
42
|
/* Begin PBXGroup section */
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
43
|
+
134814211AA4EA7D00B7C361 /* Products */ = {
|
|
44
|
+
isa = PBXGroup;
|
|
45
|
+
children = (
|
|
46
|
+
134814201AA4EA6300B7C361 /* libRNBackgroundDownloader.a */,
|
|
47
|
+
);
|
|
48
|
+
name = Products;
|
|
49
|
+
sourceTree = "<group>";
|
|
50
|
+
};
|
|
51
|
+
58B511D21A9E6C8500147676 = {
|
|
52
|
+
isa = PBXGroup;
|
|
53
|
+
children = (
|
|
54
|
+
565BF70F208F2C7C00F66231 /* RNBGDTaskConfig.h */,
|
|
55
|
+
B3E7B5881CC2AC0600A0062D /* RNBackgroundDownloader.h */,
|
|
56
|
+
B3E7B5891CC2AC0600A0062D /* RNBackgroundDownloader.m */,
|
|
57
|
+
134814211AA4EA7D00B7C361 /* Products */,
|
|
58
|
+
);
|
|
59
|
+
sourceTree = "<group>";
|
|
60
|
+
};
|
|
61
61
|
/* End PBXGroup section */
|
|
62
62
|
|
|
63
63
|
/* Begin PBXNativeTarget section */
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
64
|
+
58B511DA1A9E6C8500147676 /* RNBackgroundDownloader */ = {
|
|
65
|
+
isa = PBXNativeTarget;
|
|
66
|
+
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNBackgroundDownloader" */;
|
|
67
|
+
buildPhases = (
|
|
68
|
+
58B511D71A9E6C8500147676 /* Sources */,
|
|
69
|
+
58B511D81A9E6C8500147676 /* Frameworks */,
|
|
70
|
+
58B511D91A9E6C8500147676 /* CopyFiles */,
|
|
71
|
+
);
|
|
72
|
+
buildRules = (
|
|
73
|
+
);
|
|
74
|
+
dependencies = (
|
|
75
|
+
);
|
|
76
|
+
name = RNBackgroundDownloader;
|
|
77
|
+
productName = RCTDataManager;
|
|
78
|
+
productReference = 134814201AA4EA6300B7C361 /* libRNBackgroundDownloader.a */;
|
|
79
|
+
productType = "com.apple.product-type.library.static";
|
|
80
|
+
};
|
|
81
81
|
/* End PBXNativeTarget section */
|
|
82
82
|
|
|
83
83
|
/* Begin PBXProject section */
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
84
|
+
58B511D31A9E6C8500147676 /* Project object */ = {
|
|
85
|
+
isa = PBXProject;
|
|
86
|
+
attributes = {
|
|
87
|
+
LastUpgradeCheck = 0610;
|
|
88
|
+
ORGANIZATIONNAME = Facebook;
|
|
89
|
+
TargetAttributes = {
|
|
90
|
+
58B511DA1A9E6C8500147676 = {
|
|
91
|
+
CreatedOnToolsVersion = 6.1.1;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNBackgroundDownloader" */;
|
|
96
|
+
compatibilityVersion = "Xcode 3.2";
|
|
97
|
+
developmentRegion = English;
|
|
98
|
+
hasScannedForEncodings = 0;
|
|
99
|
+
knownRegions = (
|
|
100
|
+
en,
|
|
101
|
+
);
|
|
102
|
+
mainGroup = 58B511D21A9E6C8500147676;
|
|
103
|
+
productRefGroup = 58B511D21A9E6C8500147676;
|
|
104
|
+
projectDirPath = "";
|
|
105
|
+
projectRoot = "";
|
|
106
|
+
targets = (
|
|
107
|
+
58B511DA1A9E6C8500147676 /* RNBackgroundDownloader */,
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
110
|
/* End PBXProject section */
|
|
111
111
|
|
|
112
112
|
/* Begin PBXSourcesBuildPhase section */
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
113
|
+
58B511D71A9E6C8500147676 /* Sources */ = {
|
|
114
|
+
isa = PBXSourcesBuildPhase;
|
|
115
|
+
buildActionMask = 2147483647;
|
|
116
|
+
files = (
|
|
117
|
+
B3E7B58A1CC2AC0600A0062D /* RNBackgroundDownloader.m in Sources */,
|
|
118
|
+
);
|
|
119
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
120
|
+
};
|
|
121
121
|
/* End PBXSourcesBuildPhase section */
|
|
122
122
|
|
|
123
123
|
/* Begin XCBuildConfiguration section */
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
124
|
+
58B511ED1A9E6C8500147676 /* Debug */ = {
|
|
125
|
+
isa = XCBuildConfiguration;
|
|
126
|
+
buildSettings = {
|
|
127
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
128
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
129
|
+
CLANG_CXX_LIBRARY = "libc++";
|
|
130
|
+
CLANG_ENABLE_MODULES = YES;
|
|
131
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
|
132
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
133
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
134
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
135
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
|
136
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
137
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
|
138
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
139
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
140
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
141
|
+
COPY_PHASE_STRIP = NO;
|
|
142
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
143
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
144
|
+
GCC_DYNAMIC_NO_PIC = NO;
|
|
145
|
+
GCC_OPTIMIZATION_LEVEL = 0;
|
|
146
|
+
GCC_PREPROCESSOR_DEFINITIONS = (
|
|
147
|
+
"DEBUG=1",
|
|
148
|
+
"$(inherited)",
|
|
149
|
+
);
|
|
150
|
+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
|
151
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
152
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
153
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
154
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
155
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
156
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
157
|
+
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
|
158
|
+
MTL_ENABLE_DEBUG_INFO = YES;
|
|
159
|
+
ONLY_ACTIVE_ARCH = YES;
|
|
160
|
+
SDKROOT = iphoneos;
|
|
161
|
+
};
|
|
162
|
+
name = Debug;
|
|
163
|
+
};
|
|
164
|
+
58B511EE1A9E6C8500147676 /* Release */ = {
|
|
165
|
+
isa = XCBuildConfiguration;
|
|
166
|
+
buildSettings = {
|
|
167
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
168
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
169
|
+
CLANG_CXX_LIBRARY = "libc++";
|
|
170
|
+
CLANG_ENABLE_MODULES = YES;
|
|
171
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
|
172
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
173
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
174
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
175
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
|
176
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
177
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
|
178
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
179
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
180
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
181
|
+
COPY_PHASE_STRIP = YES;
|
|
182
|
+
ENABLE_NS_ASSERTIONS = NO;
|
|
183
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
184
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
185
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
186
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
187
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
188
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
189
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
190
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
191
|
+
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
|
192
|
+
MTL_ENABLE_DEBUG_INFO = NO;
|
|
193
|
+
SDKROOT = iphoneos;
|
|
194
|
+
VALIDATE_PRODUCT = YES;
|
|
195
|
+
};
|
|
196
|
+
name = Release;
|
|
197
|
+
};
|
|
198
|
+
58B511F01A9E6C8500147676 /* Debug */ = {
|
|
199
|
+
isa = XCBuildConfiguration;
|
|
200
|
+
buildSettings = {
|
|
201
|
+
HEADER_SEARCH_PATHS = (
|
|
202
|
+
"$(inherited)",
|
|
203
|
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
|
204
|
+
"$(SRCROOT)/../../../React/**",
|
|
205
|
+
"$(SRCROOT)/../../react-native/React/**",
|
|
206
|
+
);
|
|
207
|
+
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
|
208
|
+
OTHER_LDFLAGS = "-ObjC";
|
|
209
|
+
PRODUCT_NAME = RNBackgroundDownloader;
|
|
210
|
+
SKIP_INSTALL = YES;
|
|
211
|
+
};
|
|
212
|
+
name = Debug;
|
|
213
|
+
};
|
|
214
|
+
58B511F11A9E6C8500147676 /* Release */ = {
|
|
215
|
+
isa = XCBuildConfiguration;
|
|
216
|
+
buildSettings = {
|
|
217
|
+
HEADER_SEARCH_PATHS = (
|
|
218
|
+
"$(inherited)",
|
|
219
|
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
|
220
|
+
"$(SRCROOT)/../../../React/**",
|
|
221
|
+
"$(SRCROOT)/../../react-native/React/**",
|
|
222
|
+
);
|
|
223
|
+
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
|
224
|
+
OTHER_LDFLAGS = "-ObjC";
|
|
225
|
+
PRODUCT_NAME = RNBackgroundDownloader;
|
|
226
|
+
SKIP_INSTALL = YES;
|
|
227
|
+
};
|
|
228
|
+
name = Release;
|
|
229
|
+
};
|
|
230
230
|
/* End XCBuildConfiguration section */
|
|
231
231
|
|
|
232
232
|
/* Begin XCConfigurationList section */
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
233
|
+
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNBackgroundDownloader" */ = {
|
|
234
|
+
isa = XCConfigurationList;
|
|
235
|
+
buildConfigurations = (
|
|
236
|
+
58B511ED1A9E6C8500147676 /* Debug */,
|
|
237
|
+
58B511EE1A9E6C8500147676 /* Release */,
|
|
238
|
+
);
|
|
239
|
+
defaultConfigurationIsVisible = 0;
|
|
240
|
+
defaultConfigurationName = Release;
|
|
241
|
+
};
|
|
242
|
+
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNBackgroundDownloader" */ = {
|
|
243
|
+
isa = XCConfigurationList;
|
|
244
|
+
buildConfigurations = (
|
|
245
|
+
58B511F01A9E6C8500147676 /* Debug */,
|
|
246
|
+
58B511F11A9E6C8500147676 /* Release */,
|
|
247
|
+
);
|
|
248
|
+
defaultConfigurationIsVisible = 0;
|
|
249
|
+
defaultConfigurationName = Release;
|
|
250
|
+
};
|
|
251
251
|
/* End XCConfigurationList section */
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
};
|
|
253
|
+
rootObject = 58B511D31A9E6C8500147676 /* Project object */;
|
|
254
254
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kesha-antonov/react-native-background-downloader",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.2",
|
|
4
4
|
"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.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -56,28 +56,28 @@
|
|
|
56
56
|
]
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@babel/core": "^7.
|
|
60
|
-
"@babel/eslint-parser": "^7.
|
|
61
|
-
"@babel/preset-env": "^7.
|
|
62
|
-
"@babel/runtime": "^7.
|
|
59
|
+
"@babel/core": "^7.22.9",
|
|
60
|
+
"@babel/eslint-parser": "^7.22.9",
|
|
61
|
+
"@babel/preset-env": "^7.22.9",
|
|
62
|
+
"@babel/runtime": "^7.22.6",
|
|
63
63
|
"@react-native-community/eslint-config": "^3.2.0",
|
|
64
|
-
"babel-jest": "^29.
|
|
65
|
-
"eslint": "8.
|
|
66
|
-
"eslint-config-standard": "^17.
|
|
64
|
+
"babel-jest": "^29.6.1",
|
|
65
|
+
"eslint": "8.44.0",
|
|
66
|
+
"eslint-config-standard": "^17.1.0",
|
|
67
67
|
"eslint-config-standard-jsx": "^11.0.0",
|
|
68
68
|
"eslint-plugin-import": "^2.27.5",
|
|
69
|
-
"eslint-plugin-n": "^
|
|
69
|
+
"eslint-plugin-n": "^16.0.1",
|
|
70
70
|
"eslint-plugin-node": "^11.1.0",
|
|
71
71
|
"eslint-plugin-promise": "^6.1.1",
|
|
72
72
|
"eslint-plugin-react": "^7.32.2",
|
|
73
73
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
74
74
|
"eslint-plugin-standard": "^5.0.0",
|
|
75
|
-
"immer": "^
|
|
76
|
-
"jest": "^29.
|
|
75
|
+
"immer": "^10.0.2",
|
|
76
|
+
"jest": "^29.6.1",
|
|
77
77
|
"lint-staged": ">=13",
|
|
78
|
-
"metro-react-native-babel-preset": "^0.
|
|
78
|
+
"metro-react-native-babel-preset": "^0.77.0",
|
|
79
79
|
"react": "18.2.0",
|
|
80
|
-
"react-native": "0.
|
|
80
|
+
"react-native": "0.72.3",
|
|
81
81
|
"react-native-fs": "^2.20.0",
|
|
82
82
|
"react-native-vector-icons": "^9.2.0",
|
|
83
83
|
"react-test-renderer": "18.2.0"
|