native-update-capacitor 4.4.6 → 5.0.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/NativeUpdate.podspec +2 -2
- package/README.md +10 -10
- package/android/build.gradle +8 -22
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/src/main/java/com/aoneahsan/nativeupdate/LiveUpdatePlugin.kt +1 -1
- package/android/variables.gradle +0 -1
- package/dist/esm/core/update-check.d.ts +1 -1
- package/dist/esm/core/update-check.js +1 -1
- package/dist/plugin.cjs +1 -1
- package/dist/plugin.esm.js +1 -1
- package/dist/plugin.js +2 -2
- package/docs/CHANGELOG.md +9 -0
- package/docs/MIGRATION.md +8 -0
- package/ios/Plugin/AppReview/AppReviewPlugin.swift +10 -20
- package/ios/Plugin/BackgroundUpdate/BackgroundNotificationManager.swift +1 -5
- package/ios/Plugin/BackgroundUpdate/BackgroundUpdatePlugin.swift +10 -27
- package/ios/Plugin/LiveUpdate/LiveUpdatePlugin.swift +1 -1
- package/ios/Plugin/NativeUpdatePlugin.swift +1 -14
- package/package.json +22 -15
package/NativeUpdate.podspec
CHANGED
|
@@ -11,8 +11,8 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
13
|
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
-
s.ios.deployment_target = '
|
|
15
|
-
s.dependency 'Capacitor'
|
|
14
|
+
s.ios.deployment_target = '16.0'
|
|
15
|
+
s.dependency 'Capacitor', '>= 9.0', '< 10.0'
|
|
16
16
|
s.dependency 'ZIPFoundation', '~> 0.9.19'
|
|
17
17
|
s.swift_version = '5.9'
|
|
18
18
|
s.frameworks = 'LocalAuthentication', 'Security'
|
package/README.md
CHANGED
|
@@ -43,11 +43,11 @@ are available as an HTTP API for CI and coding agents.
|
|
|
43
43
|
|
|
44
44
|
| | |
|
|
45
45
|
|---|---|
|
|
46
|
-
| **Version** | `
|
|
46
|
+
| **Version** | `5.0.0` |
|
|
47
47
|
| **License** | Proprietary — free to use in your apps ([LICENSE](./LICENSE)) |
|
|
48
48
|
| **Node** | `>=24.16.0` (install + CLI toolchain) |
|
|
49
|
-
| **Platforms** | iOS
|
|
50
|
-
| **Package size** |
|
|
49
|
+
| **Platforms** | iOS 16+ (implementation pending device proof) · Android 8.0+ (API 26) · Web |
|
|
50
|
+
| **Package size** | See the published npm tarball |
|
|
51
51
|
| **Types** | Bundled `.d.ts` · ESM + CommonJS entry points |
|
|
52
52
|
| **Status** | Stable · actively maintained |
|
|
53
53
|
|
|
@@ -128,7 +128,7 @@ policies is your responsibility — see [Limitations](#limitations).
|
|
|
128
128
|
| Platform | Live updates | App updates | App reviews | Notes |
|
|
129
129
|
|---|---|---|---|---|
|
|
130
130
|
| Android | ✅ | ✅ | ✅ | Google Play Core immediate and flexible flows |
|
|
131
|
-
| iOS |
|
|
131
|
+
| iOS | Implemented | Implemented | Implemented | Requires Xcode 27 and device verification before a support claim |
|
|
132
132
|
| Web | ✅ | ⚠️ | ⚠️ | Bundle handling works; store-update and review calls resolve as no-ops so shared code need not branch |
|
|
133
133
|
|
|
134
134
|
Certificate pinning and accurate storage measurement are native-only — the web build reports both as
|
|
@@ -140,11 +140,11 @@ unavailable rather than pretending. See [Limitations](#limitations).
|
|
|
140
140
|
| Requirement | Version | Why |
|
|
141
141
|
|---|---|---|
|
|
142
142
|
| Node | `>=24.16.0` | declared in `engines`; installers that enforce `engines` refuse an older runtime. Needed to install and to run the CLI — not by your app at runtime |
|
|
143
|
-
| `@capacitor/core` | `^
|
|
144
|
-
| `@capacitor/filesystem` |
|
|
145
|
-
| `@capacitor/preferences` |
|
|
146
|
-
| iOS |
|
|
147
|
-
| Android | 8.0+ (API 26) |
|
|
143
|
+
| `@capacitor/core` | `^9.0.0` | peer — the host app owns the Capacitor version |
|
|
144
|
+
| `@capacitor/filesystem` | `^9.0.0` | peer — stores and extracts downloaded bundles |
|
|
145
|
+
| `@capacitor/preferences` | `^9.0.0` | peer — records which bundle is active and whether it was confirmed |
|
|
146
|
+
| iOS | 16.0+ | minimum deployment target of the native plugin |
|
|
147
|
+
| Android | 8.0+ (API 26) | compile SDK 37, AGP 9.4.1 and Java 21 |
|
|
148
148
|
| An update server | — | the hosted Native Update service, or your own implementation of the HTTP contract |
|
|
149
149
|
|
|
150
150
|
<a id="installation"></a>
|
|
@@ -540,7 +540,7 @@ indexed at [`/raw/manifest.json`](https://nativeupdate-docs.aoneahsan.com/raw/ma
|
|
|
540
540
|
<a id="changelog"></a>
|
|
541
541
|
## 🔄 Changelog [#](#changelog)
|
|
542
542
|
|
|
543
|
-
|
|
543
|
+
Current release: **`5.0.0`** (Capacitor 9 migration; see [migration guide](docs/MIGRATION.md)). In 4.4.5, `set()` gained `applyOn: 'next-start'`, which stages a bundle for the next cold start instead of reloading the running app. Before that, 4.4.4: `--ota-tag` reads `versionName` only from a real statement in `build.gradle`
|
|
544
544
|
(comments and message strings are skipped, `versionName appVersionName` is followed to its value). **`4.4.3`**: Android logs `Built <id> from a N-byte patch` when an update arrives as a `NUDELTA/1`
|
|
545
545
|
patch, so you can see deltas working on a device. No API change.
|
|
546
546
|
|
package/android/build.gradle
CHANGED
|
@@ -4,21 +4,15 @@ buildscript {
|
|
|
4
4
|
mavenCentral()
|
|
5
5
|
}
|
|
6
6
|
dependencies {
|
|
7
|
-
classpath 'com.android.tools.build:gradle:
|
|
8
|
-
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:2.2.20'
|
|
7
|
+
classpath 'com.android.tools.build:gradle:9.4.1'
|
|
9
8
|
}
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
ext {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
// assemble against a lower manifest floor than its required peer.
|
|
18
|
-
minSdkVersion = 26
|
|
19
|
-
androidxAppCompatVersion = '1.7.1'
|
|
20
|
-
// 1.19 requires compileSdk 37 + AGP 9.1; Capacitor 8's supported line is AGP 8/API 36.
|
|
21
|
-
androidxCoreVersion = '1.17.0'
|
|
12
|
+
compileSdkVersion = rootProject.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 37
|
|
13
|
+
minSdkVersion = rootProject.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 26
|
|
14
|
+
androidxAppCompatVersion = rootProject.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.8.0'
|
|
15
|
+
androidxCoreVersion = rootProject.hasProperty('androidxCoreVersion') ? rootProject.ext.androidxCoreVersion : '1.19.1'
|
|
22
16
|
androidxWorkVersion = '2.11.2'
|
|
23
17
|
playAppUpdateVersion = '2.1.0'
|
|
24
18
|
playAppUpdateKtxVersion = '2.1.0'
|
|
@@ -28,7 +22,6 @@ ext {
|
|
|
28
22
|
}
|
|
29
23
|
|
|
30
24
|
apply plugin: 'com.android.library'
|
|
31
|
-
apply plugin: 'kotlin-android'
|
|
32
25
|
|
|
33
26
|
android {
|
|
34
27
|
namespace = "com.aoneahsan.nativeupdate"
|
|
@@ -36,7 +29,6 @@ android {
|
|
|
36
29
|
|
|
37
30
|
defaultConfig {
|
|
38
31
|
minSdkVersion project.minSdkVersion
|
|
39
|
-
targetSdkVersion project.targetSdkVersion
|
|
40
32
|
versionCode 1
|
|
41
33
|
versionName "1.0"
|
|
42
34
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
@@ -59,8 +51,7 @@ android {
|
|
|
59
51
|
lint {
|
|
60
52
|
abortOnError = true
|
|
61
53
|
warningsAsErrors = true
|
|
62
|
-
//
|
|
63
|
-
// KTX preference hints are style-only and do not affect correctness.
|
|
54
|
+
// Version availability hints are checked during the dependency audit.
|
|
64
55
|
disable += ['AndroidGradlePluginVersion', 'GradleDependency', 'NewerVersionAvailable', 'UseKtx']
|
|
65
56
|
}
|
|
66
57
|
|
|
@@ -69,10 +60,6 @@ android {
|
|
|
69
60
|
targetCompatibility JavaVersion.VERSION_21
|
|
70
61
|
}
|
|
71
62
|
|
|
72
|
-
kotlinOptions {
|
|
73
|
-
jvmTarget = '21'
|
|
74
|
-
}
|
|
75
|
-
|
|
76
63
|
testOptions {
|
|
77
64
|
unitTests {
|
|
78
65
|
includeAndroidResources = true
|
|
@@ -90,14 +77,13 @@ dependencies {
|
|
|
90
77
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
91
78
|
implementation project(':capacitor-android')
|
|
92
79
|
|
|
93
|
-
// Kotlin
|
|
94
|
-
implementation 'org.jetbrains.kotlin:kotlin-stdlib:2.2.20'
|
|
80
|
+
// Kotlin is built into Android Gradle Plugin 9.
|
|
95
81
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.11.0'
|
|
96
82
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.11.0'
|
|
97
83
|
|
|
98
84
|
// AndroidX
|
|
99
85
|
implementation "androidx.appcompat:appcompat:${androidxAppCompatVersion}"
|
|
100
|
-
implementation "androidx.core:core
|
|
86
|
+
implementation "androidx.core:core:${androidxCoreVersion}"
|
|
101
87
|
implementation "androidx.work:work-runtime-ktx:${androidxWorkVersion}"
|
|
102
88
|
|
|
103
89
|
// Google Play Services - Using explicit versions to avoid resolution issues
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Gradle Wrapper Properties
|
|
2
2
|
distributionBase=GRADLE_USER_HOME
|
|
3
3
|
distributionPath=wrapper/dists
|
|
4
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.
|
|
4
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-all.zip
|
|
5
5
|
networkTimeout=10000
|
|
6
6
|
validateDistributionUrl=true
|
|
7
7
|
zipStoreBase=GRADLE_USER_HOME
|
|
@@ -61,7 +61,7 @@ class LiveUpdatePlugin(
|
|
|
61
61
|
|
|
62
62
|
companion object {
|
|
63
63
|
/** This plugin's version, sent as X-Sdk-Version. Kept equal to package.json by tests/sdk-version.test.ts. */
|
|
64
|
-
const val SDK_VERSION = "
|
|
64
|
+
const val SDK_VERSION = "5.0.0"
|
|
65
65
|
|
|
66
66
|
// SharedPreferences keys. Kept as constants so A2 (boot-time
|
|
67
67
|
// re-verification) and A3 (crash-loop auto-rollback) stay in sync
|
package/android/variables.gradle
CHANGED
|
@@ -60,7 +60,7 @@ import type { AppIdentity } from '../types/app-identity';
|
|
|
60
60
|
* This plugin's version, sent as `X-Sdk-Version`. Kept equal to package.json (and to the Kotlin and Swift
|
|
61
61
|
* constants) by tests/sdk-version.test.ts.
|
|
62
62
|
*/
|
|
63
|
-
export declare const SDK_VERSION = "
|
|
63
|
+
export declare const SDK_VERSION = "5.0.0";
|
|
64
64
|
/** Request inputs for a single backend update check. */
|
|
65
65
|
export interface UpdateCheckRequest {
|
|
66
66
|
/** API key issued by the dashboard; sent as `X-API-Key`. Required. */
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
* This plugin's version, sent as `X-Sdk-Version`. Kept equal to package.json (and to the Kotlin and Swift
|
|
60
60
|
* constants) by tests/sdk-version.test.ts.
|
|
61
61
|
*/
|
|
62
|
-
export const SDK_VERSION = '
|
|
62
|
+
export const SDK_VERSION = '5.0.0';
|
|
63
63
|
/**
|
|
64
64
|
* Perform one update check against the Native Update backend.
|
|
65
65
|
*
|