capacitor-background-transfer 0.1.0 → 0.2.0

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/Package.swift CHANGED
@@ -10,7 +10,7 @@ let package = Package(
10
10
  targets: ["BackgroundTransferPlugin"])
11
11
  ],
12
12
  dependencies: [
13
- .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0")
13
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", "7.0.0"..<"9.0.0")
14
14
  ],
15
15
  targets: [
16
16
  // Foundation only: records, the store, the remainder copy and the download's part file.
package/README.md CHANGED
@@ -2,14 +2,15 @@
2
2
 
3
3
  **Uploads and downloads that keep going when your Capacitor app doesn't.**
4
4
 
5
- [![CI](https://github.com/sandman-92/capacitor-background-transfer/actions/workflows/ci.yml/badge.svg)](https://github.com/sandman-92/capacitor-background-transfer/actions/workflows/ci.yml)
5
+ [![npm](https://img.shields.io/npm/v/capacitor-background-transfer.svg)](https://www.npmjs.com/package/capacitor-background-transfer)
6
+ [![CI](https://github.com/Outface-World/capacitor-background-transfer/actions/workflows/ci.yml/badge.svg)](https://github.com/Outface-World/capacitor-background-transfer/actions/workflows/ci.yml)
6
7
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
- ![Capacitor 7](https://img.shields.io/badge/Capacitor-7-119eff.svg)
8
+ ![Capacitor 7 and 8](https://img.shields.io/badge/Capacitor-7%20%7C%208-119eff.svg)
8
9
  ![Android 6+](https://img.shields.io/badge/Android-6.0%2B-3ddc84.svg)
9
10
  ![iOS 15+](https://img.shields.io/badge/iOS-15%2B-lightgrey.svg)
10
11
 
11
- [Install](#install) · [Quick start](#quick-start) · [Upload protocols](docs/upload-protocols.md) ·
12
- [How it works](docs/how-it-works.md) · [API](#api) · [Changelog](CHANGELOG.md)
12
+ [Install](#install) · [npm](https://www.npmjs.com/package/capacitor-background-transfer) ·
13
+ [Quick start](#quick-start) · [Upload protocols](docs/upload-protocols.md) · [How it works](docs/how-it-works.md) · [API](#api) · [Changelog](CHANGELOG.md)
13
14
 
14
15
  A phone suspends an app soon after it leaves the screen, and an upload made with `fetch` or XHR
15
16
  from the web view is suspended with it. For a large file on a mobile network, the user has to keep
@@ -42,14 +43,19 @@ starting again.
42
43
  ## Status
43
44
 
44
45
  Early but complete: version 0.x, so the API may still change before 1.0. The JVM and Swift tests
45
- run in CI, including against local MinIO (S3) and Azurite (Azure) servers. The upload protocols
46
- also run end to end on the Android emulator and the iOS simulator, with the app killed, the
47
- network cut and URLs left to expire. Real AWS and Azure accounts, a locked iPhone and makers' own
46
+ run in CI, including against local MinIO (S3) and Azurite (Azure) servers. CI also builds the
47
+ plugin into new Capacitor 7 and Capacitor 8 apps for Android and iOS on every pull request, with
48
+ the first and the newest release of each. The upload protocols have also run end to end on the
49
+ Android emulator and the iOS simulator, in a Capacitor 7 app, with the app killed, the network cut
50
+ and URLs left to expire. Real AWS and Azure accounts, a locked iPhone and makers' own
48
51
  battery managers haven't been tested yet (see [what's checked](docs/upload-protocols.md#checked-here-and-not)).
49
52
  Reports from real apps are very welcome.
50
53
 
51
54
  ## Install
52
55
 
56
+ The plugin is published on npm as
57
+ [`capacitor-background-transfer`](https://www.npmjs.com/package/capacitor-background-transfer).
58
+
53
59
  ```bash
54
60
  npm install capacitor-background-transfer
55
61
  npx cap sync
@@ -57,8 +63,8 @@ npx cap sync
57
63
 
58
64
  | Platform | Supported |
59
65
  |---|---|
60
- | Capacitor | 7 |
61
- | Android | 6.0 (API 23) and later |
66
+ | Capacitor | 7 and 8 |
67
+ | Android | Capacitor 7: 6.0 (API 23) and later. Capacitor 8: 7.0 (API 24) and later |
62
68
  | iOS | 15 and later, with Swift Package Manager or CocoaPods |
63
69
  | Web | No: `isAvailable()` returns `{ available: false }` |
64
70
 
@@ -87,6 +93,10 @@ progress notification shown; transfers run without it. The WorkManager version f
87
93
 
88
94
  ### iOS: one `AppDelegate` method
89
95
 
96
+ A new Capacitor 7 app targets iOS 14: raise its deployment target to 15 (in the Xcode project, and
97
+ in the `Podfile` with CocoaPods), then run `npx cap sync` again, which gives the app's Swift package
98
+ the new target or runs `pod install` with it. A Capacitor 8 app already targets 15.
99
+
90
100
  Hand the system's background session events to the plugin in `AppDelegate`, so transfers that
91
101
  end while the app is closed are recorded straight away (otherwise on the next launch):
92
102
 
@@ -212,7 +222,7 @@ short life are the better route for credentials.
212
222
 
213
223
  ## Feedback and contributing
214
224
 
215
- Found a bug or want a feature? [Open an issue](https://github.com/sandman-92/capacitor-background-transfer/issues).
225
+ Found a bug or want a feature? [Open an issue](https://github.com/Outface-World/capacitor-background-transfer/issues).
216
226
  Pull requests are welcome too. [CONTRIBUTING.md](CONTRIBUTING.md) explains how to build the plugin,
217
227
  run its tests (including the local S3 and Azure servers) and try a change on a device with the
218
228
  [example app](example-app/). To report a security problem privately, see [SECURITY.md](SECURITY.md).
@@ -1,8 +1,8 @@
1
1
  ext {
2
2
  junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3
- androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
4
- androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
5
- androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
3
+ androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
4
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
5
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
6
6
  // Follows the app's own workManagerVersion (variables.gradle) when it sets one.
7
7
  workManagerVersion = project.hasProperty('workManagerVersion') ? rootProject.ext.workManagerVersion : '2.10.0'
8
8
  }
@@ -13,7 +13,7 @@ buildscript {
13
13
  mavenCentral()
14
14
  }
15
15
  dependencies {
16
- classpath 'com.android.tools.build:gradle:8.7.2'
16
+ classpath 'com.android.tools.build:gradle:8.13.0'
17
17
  }
18
18
  }
19
19
 
@@ -21,10 +21,10 @@ apply plugin: 'com.android.library'
21
21
 
22
22
  android {
23
23
  namespace "io.github.sandman92.backgroundtransfer"
24
- compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
24
+ compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
25
25
  defaultConfig {
26
26
  minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
27
- targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
27
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
28
28
  versionCode 1
29
29
  versionName "1.0"
30
30
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-background-transfer",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Background uploads and downloads for Capacitor: Firebase Storage resumable uploads, S3 multipart uploads, Azure block blobs and plain PUTs, and resumable downloads, that keep going with the app in the background or closed",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -18,10 +18,10 @@
18
18
  "license": "MIT",
19
19
  "repository": {
20
20
  "type": "git",
21
- "url": "git+https://github.com/sandman-92/capacitor-background-transfer.git"
21
+ "url": "git+https://github.com/Outface-World/capacitor-background-transfer.git"
22
22
  },
23
23
  "bugs": {
24
- "url": "https://github.com/sandman-92/capacitor-background-transfer/issues"
24
+ "url": "https://github.com/Outface-World/capacitor-background-transfer/issues"
25
25
  },
26
26
  "keywords": [
27
27
  "capacitor",
@@ -58,13 +58,14 @@
58
58
  "servers:up": "docker compose -f test-servers/compose.yaml up -d --wait",
59
59
  "servers:down": "docker compose -f test-servers/compose.yaml down",
60
60
  "test:servers": "node test-servers/run-tests.mjs",
61
+ "test:matrix": "node test-matrix/run-matrix.mjs",
61
62
  "test:e2e": "node test-servers/e2e.mjs"
62
63
  },
63
64
  "devDependencies": {
64
- "@capacitor/android": "^7.0.0",
65
- "@capacitor/core": "^7.0.0",
65
+ "@capacitor/android": "^8.0.0",
66
+ "@capacitor/core": "^8.0.0",
66
67
  "@capacitor/docgen": "^0.3.0",
67
- "@capacitor/ios": "^7.0.0",
68
+ "@capacitor/ios": "^8.0.0",
68
69
  "@ionic/eslint-config": "^0.4.0",
69
70
  "@ionic/prettier-config": "^4.0.0",
70
71
  "@ionic/swiftlint-config": "^2.0.0",
@@ -79,7 +80,7 @@
79
80
  "vitest": "^5.0.5"
80
81
  },
81
82
  "peerDependencies": {
82
- "@capacitor/core": ">=7.0.0"
83
+ "@capacitor/core": ">=7.0.0 <9.0.0"
83
84
  },
84
85
  "prettier": "@ionic/prettier-config",
85
86
  "swiftlint": "@ionic/swiftlint-config",
@@ -94,5 +95,5 @@
94
95
  "src": "android"
95
96
  }
96
97
  },
97
- "homepage": "https://github.com/sandman-92/capacitor-background-transfer#readme"
98
+ "homepage": "https://github.com/Outface-World/capacitor-background-transfer#readme"
98
99
  }