native-update-capacitor 4.4.5 โ 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/AI-INTEGRATION-GUIDE.md +1 -1
- package/NativeUpdate.podspec +2 -2
- package/README.md +21 -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 +17 -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/AI-INTEGRATION-GUIDE.md
CHANGED
|
@@ -107,7 +107,7 @@ if (eligibility.canRequest) {
|
|
|
107
107
|
|--------|-------------|---------|
|
|
108
108
|
| `sync(options?)` | Check and apply updates | `Promise<SyncResult>` |
|
|
109
109
|
| `download(options)` | Download specific version | `Promise<BundleInfo>` |
|
|
110
|
-
| `set(bundle)` |
|
|
110
|
+
| `set({ ...bundle, applyOn? })` | Make a bundle the app's bundle: `'now'` (default) switches at once, `'next-start'` (4.4.5+) stages it for the next cold start | `Promise<void>` |
|
|
111
111
|
| `reload()` | Reload app with current bundle | `Promise<void>` |
|
|
112
112
|
| `reset()` | Reset to original bundle | `Promise<void>` |
|
|
113
113
|
| `current()` | Get current bundle info | `Promise<BundleInfo>` |
|
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
|
@@ -21,6 +21,16 @@
|
|
|
21
21
|
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
|
+
<a id="available-on"></a>
|
|
25
|
+
## ๐ฆ Available on [#](#available-on)
|
|
26
|
+
|
|
27
|
+
| Where | Link |
|
|
28
|
+
|---|---|
|
|
29
|
+
| npm | [`native-update`](https://www.npmjs.com/package/native-update) |
|
|
30
|
+
| Dashboard | [nativeupdate.aoneahsan.com](https://nativeupdate.aoneahsan.com) |
|
|
31
|
+
| Docs | [nativeupdate-docs.aoneahsan.com](https://nativeupdate-docs.aoneahsan.com) |
|
|
32
|
+
| Everything | [All apps](https://nativeupdate-docs.aoneahsan.com/apps) |
|
|
33
|
+
|
|
24
34
|
> [!IMPORTANT]
|
|
25
35
|
> Call `NativeUpdate.notifyAppReady()` on **every** successful boot. Activating a bundle marks it
|
|
26
36
|
> pending-verification, and the native layer rolls it back after two cold starts that never confirm. Miss
|
|
@@ -33,17 +43,18 @@ are available as an HTTP API for CI and coding agents.
|
|
|
33
43
|
|
|
34
44
|
| | |
|
|
35
45
|
|---|---|
|
|
36
|
-
| **Version** | `
|
|
46
|
+
| **Version** | `5.0.0` |
|
|
37
47
|
| **License** | Proprietary โ free to use in your apps ([LICENSE](./LICENSE)) |
|
|
38
48
|
| **Node** | `>=24.16.0` (install + CLI toolchain) |
|
|
39
|
-
| **Platforms** | iOS
|
|
40
|
-
| **Package size** |
|
|
49
|
+
| **Platforms** | iOS 16+ (implementation pending device proof) ยท Android 8.0+ (API 26) ยท Web |
|
|
50
|
+
| **Package size** | See the published npm tarball |
|
|
41
51
|
| **Types** | Bundled `.d.ts` ยท ESM + CommonJS entry points |
|
|
42
52
|
| **Status** | Stable ยท actively maintained |
|
|
43
53
|
|
|
44
54
|
<a id="table-of-contents"></a>
|
|
45
55
|
## ๐งญ Table of Contents [#](#table-of-contents)
|
|
46
56
|
|
|
57
|
+
- [๐ฆ Available on](#available-on)
|
|
47
58
|
- [๐ก Why native-update](#why-native-update)
|
|
48
59
|
- [โจ Features](#features)
|
|
49
60
|
- [๐ฑ Platform Support](#platform-support)
|
|
@@ -117,7 +128,7 @@ policies is your responsibility โ see [Limitations](#limitations).
|
|
|
117
128
|
| Platform | Live updates | App updates | App reviews | Notes |
|
|
118
129
|
|---|---|---|---|---|
|
|
119
130
|
| Android | โ
| โ
| โ
| Google Play Core immediate and flexible flows |
|
|
120
|
-
| iOS |
|
|
131
|
+
| iOS | Implemented | Implemented | Implemented | Requires Xcode 27 and device verification before a support claim |
|
|
121
132
|
| Web | โ
| โ ๏ธ | โ ๏ธ | Bundle handling works; store-update and review calls resolve as no-ops so shared code need not branch |
|
|
122
133
|
|
|
123
134
|
Certificate pinning and accurate storage measurement are native-only โ the web build reports both as
|
|
@@ -129,11 +140,11 @@ unavailable rather than pretending. See [Limitations](#limitations).
|
|
|
129
140
|
| Requirement | Version | Why |
|
|
130
141
|
|---|---|---|
|
|
131
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 |
|
|
132
|
-
| `@capacitor/core` | `^
|
|
133
|
-
| `@capacitor/filesystem` |
|
|
134
|
-
| `@capacitor/preferences` |
|
|
135
|
-
| iOS |
|
|
136
|
-
| 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 |
|
|
137
148
|
| An update server | โ | the hosted Native Update service, or your own implementation of the HTTP contract |
|
|
138
149
|
|
|
139
150
|
<a id="installation"></a>
|
|
@@ -529,7 +540,7 @@ indexed at [`/raw/manifest.json`](https://nativeupdate-docs.aoneahsan.com/raw/ma
|
|
|
529
540
|
<a id="changelog"></a>
|
|
530
541
|
## ๐ Changelog [#](#changelog)
|
|
531
542
|
|
|
532
|
-
|
|
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`
|
|
533
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`
|
|
534
545
|
patch, so you can see deltas working on a device. No API change.
|
|
535
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
|
*
|