@capgo/capacitor-updater 7.51.23 → 7.53.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/CapgoCapacitorUpdater.podspec +0 -3
- package/Package.swift +3 -11
- package/README.md +201 -66
- package/android/build.gradle +2 -3
- package/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdaterPlugin.java +593 -176
- package/android/src/main/java/ee/forgr/capacitor_updater/CapgoUpdater.java +775 -162
- package/android/src/main/java/ee/forgr/capacitor_updater/CryptoCipher.java +2 -1
- package/android/src/main/java/ee/forgr/capacitor_updater/DelayUpdateUtils.java +226 -106
- package/android/src/main/java/ee/forgr/capacitor_updater/DownloadService.java +107 -30
- package/android/src/main/java/ee/forgr/capacitor_updater/HeadlessUpdateWorker.java +325 -0
- package/android/src/main/java/ee/forgr/capacitor_updater/Logger.java +63 -4
- package/android/src/main/java/ee/forgr/capacitor_updater/NativeUpdatePrompt.java +303 -0
- package/android/src/main/java/ee/forgr/capacitor_updater/Version.java +306 -0
- package/dist/docs.json +394 -27
- package/dist/esm/definitions.d.ts +220 -7
- package/dist/esm/definitions.js.map +1 -1
- package/ios/Sources/CapacitorUpdaterPlugin/AES.swift +104 -52
- package/ios/Sources/CapacitorUpdaterPlugin/CapacitorUpdaterPlugin.swift +472 -144
- package/ios/Sources/CapacitorUpdaterPlugin/CapgoSemanticVersion.swift +162 -0
- package/ios/Sources/CapacitorUpdaterPlugin/CapgoUpdater.swift +392 -82
- package/ios/Sources/CapacitorUpdaterPlugin/CryptoCipher.swift +2 -1
- package/ios/Sources/CapacitorUpdaterPlugin/DelayUpdateUtils.swift +204 -93
- package/ios/Sources/CapacitorUpdaterPlugin/Logger.swift +75 -5
- package/ios/Sources/CapacitorUpdaterPlugin/NativeUpdatePrompt.swift +183 -0
- package/ios/Sources/CapacitorUpdaterPlugin/RedirectPolicyDelegate.swift +53 -0
- package/ios/Sources/CapacitorUpdaterPlugin/ShakeMenu.swift +5 -2
- package/ios/Sources/CapacitorUpdaterPlugin/ZipArchiveReader.swift +247 -0
- package/ios/Sources/CapacitorUpdaterPlugin/ZipCentralDirectory.swift +280 -0
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# Capacitor updater
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Ship live updates to your Capacitor app: push JavaScript, HTML and CSS fixes to users right away without waiting for store review, with Capgo Cloud or your own server.
|
|
4
|
+
|
|
5
|
+
This plugin is the live update layer of [Capgo](https://capgo.app/), the AI-ready platform to build, ship, and maintain Capacitor apps: Capacitor skills and MCP servers for AI coding agents (Claude Code, Codex, Cursor, Copilot, Gemini CLI), [maintained Capacitor plugins](https://capgo.app/plugins/), [cloud native iOS/Android builds](https://capgo.app/native-build/) with App Store and Google Play publishing, live updates with channels and rollback, and release monitoring.
|
|
6
|
+
|
|
7
|
+
<a href="https://capgo.app/?ref=plugin_updater_v7"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-updater" alt="Capgo - Instant updates for Capacitor" /></a>
|
|
8
|
+
|
|
9
|
+
<div align="center">
|
|
10
|
+
<p><b>Capgo</b>: open-source live updates for Ionic and Capacitor apps. Ship OTA fixes and features instantly, without waiting for app store review.</p>
|
|
11
|
+
<h2><a href="https://capgo.app/register/?ref=plugin_updater_v7">➡️ Get started for free</a></h2>
|
|
12
|
+
<p>14-day unlimited free trial. No credit card required</p>
|
|
13
|
+
<p><a href="https://capgo.app/consulting/?ref=plugin_updater_v7">Missing a feature? We'll build the plugin for you 💪</a></p>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<img src="https://raw.githubusercontent.com/Cap-go/capacitor-updater/main/assets/github-social-preview.png" alt="@capgo/capacitor-updater for Capacitor apps" width="300" />
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
## Use with AI coding agents
|
|
21
|
+
|
|
22
|
+
Capgo provides skills and a hosted MCP server so AI coding agents can set up and operate Capacitor apps, including this plugin.
|
|
23
|
+
|
|
24
|
+
- **Skills**: install the [Capgo skills](https://capgo.app/skills/) ([source](https://github.com/Cap-go/capgo-skills)) in your agent:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx skills add Cap-go/capgo-skills
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- **Hosted MCP server**: `https://api.capgo.app/mcp` ([docs](https://capgo.app/docs/ai/mcp/)).
|
|
31
|
+
- **Agent setup guides**: [capgo.app/agents](https://capgo.app/agents/) and [AI tools for Capacitor](https://capgo.app/best/ai-tools-for-capacitor/).
|
|
32
|
+
|
|
33
|
+
## Key features
|
|
34
|
+
|
|
35
|
+
- **Auto update**: downloads and applies the latest bundle from Capgo Cloud or your own update server.
|
|
36
|
+
- **Safe rollouts**: `notifyAppReady()` confirms a bundle works, otherwise the app rolls back to the last working one.
|
|
37
|
+
- **Bundle control**: `download()`, `next()`, `set()`, `list()`, `delete()` and `reset()` for manual flows.
|
|
38
|
+
- **Channels**: `setChannel()`, `getChannel()` and `listChannels()` for environments and per-device QA.
|
|
39
|
+
- **Delta updates and security**: only changed files are downloaded, checksums are verified, and encryption is optional.
|
|
40
|
+
- **Preview sessions**: `startPreviewSession()`, `setPreview()` and `resetPreview()` to test bundles on a device.
|
|
41
|
+
- **Platforms**: iOS and Android. Web is a stub for development.
|
|
42
|
+
|
|
3
43
|
[](https://discord.com/invite/VnYRvBfgA6)
|
|
4
44
|
<a href="https://discord.com/invite/VnYRvBfgA6"><img src="https://img.shields.io/discord/912707985829163099?color=%237289DA&label=Discord" alt="Discord">
|
|
5
45
|
[](https://www.npmjs.com/package/@capgo/capacitor-updater)
|
|
@@ -15,11 +55,6 @@
|
|
|
15
55
|
[](https://console.algora.io/org/Capgo/bounties?status=open)
|
|
16
56
|
[](https://console.algora.io/org/Capgo/bounties?status=completed)
|
|
17
57
|
|
|
18
|
-
<div align="center">
|
|
19
|
-
<h2><a href="https://capgo.app/?ref=plugin_updater_v7"> ➡️ Get Instant updates for your App with Capgo</a></h2>
|
|
20
|
-
<h2><a href="https://capgo.app/consulting/?ref=plugin_updater_v7"> Missing a feature? We’ll build the plugin for you 💪</a></h2>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
58
|
Capacitor plugin to update your app remotely in real-time.
|
|
24
59
|
|
|
25
60
|
Open-source Alternative to Appflow, Codepush or Capawesome
|
|
@@ -86,7 +121,7 @@ First follow the migration guide of Capacitor:
|
|
|
86
121
|
|
|
87
122
|
The minimum iOS version is now **15.0** to match Capacitor 7/8 requirements.
|
|
88
123
|
|
|
89
|
-
|
|
124
|
+
The plugin has no third-party iOS dependencies besides Capacitor: ZIP extraction uses a built-in reader on top of Apple's native `Compression` framework, and networking uses `URLSession`.
|
|
90
125
|
|
|
91
126
|
## Compatibility
|
|
92
127
|
|
|
@@ -136,13 +171,13 @@ We recommend to declare [`CA92.1`](https://developer.apple.com/documentation/bun
|
|
|
136
171
|
You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:
|
|
137
172
|
|
|
138
173
|
```bash
|
|
139
|
-
npx skills add https://github.com/
|
|
174
|
+
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins
|
|
140
175
|
```
|
|
141
176
|
|
|
142
177
|
Then use the following prompt:
|
|
143
178
|
|
|
144
179
|
```text
|
|
145
|
-
Use the `capacitor-plugins` skill from `
|
|
180
|
+
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-updater` plugin in my project.
|
|
146
181
|
```
|
|
147
182
|
|
|
148
183
|
If you prefer Manual Setup, install the plugin by running the following commands and follow the platform-specific instructions below:
|
|
@@ -309,47 +344,56 @@ Downgrading to a previous version of the updater plugin is not supported.
|
|
|
309
344
|
|
|
310
345
|
CapacitorUpdater can be configured with these options:
|
|
311
346
|
|
|
312
|
-
| Prop | Type | Description | Default
|
|
313
|
-
| -------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
314
|
-
| **`appReadyTimeout`** | <code>number</code> | Configure the number of milliseconds the native plugin should wait before considering an update 'failed'. Only available for Android and iOS. | <code>10000 // (10 seconds)</code>
|
|
315
|
-
| **`responseTimeout`** | <code>number</code> | Configure the number of seconds the native plugin should wait before considering an HTTP timeout. Applies to update checks and file downloads. On Android these are idle connect/read/write timeouts and do not cap total download time; on iOS the request timeout also bounds the total download duration. Only available for Android and iOS. | <code>20 // (20 second)</code>
|
|
316
|
-
| **`autoDeleteFailed`** | <code>boolean</code> | Configure whether the plugin should use automatically delete failed bundles. Only available for Android and iOS. | <code>true</code>
|
|
317
|
-
| **`autoDeletePrevious`** | <code>boolean</code> | Configure whether the plugin should use automatically delete previous bundles after a successful update. Only available for Android and iOS. | <code>true</code>
|
|
318
|
-
| **`autoUpdate`** | <code>boolean \| 'always' \| 'off' \| 'atBackground' \| 'atInstall' \| 'onLaunch' \| 'onlyDownload'</code> | Configure how the plugin checks for, downloads, and applies live updates. The plugin checks for updates when the app moves to the foreground. When {@link periodCheckDelay} is greater than 0, it also checks on a repeating timer while the app stays open. Boolean values keep their existing behavior: - `true`: Same as `"atBackground"`. - `false`: Same as `"off"`. String values merge the previous Auto Update and Direct Update configuration: - `"off"`: Disable automatic update checks. - `"atBackground"`: Check and download automatically on each foreground check, then apply the update the next time the app moves to background. - `"atInstall"`: Apply immediately only after a fresh install or native app store update; otherwise use `"atBackground"` behavior. - `"onLaunch"`: Apply immediately only when the app is brought to the foreground from a killed state (cold start). After that first check, fall back to `"atBackground"` behavior. - `"always"`: Check on every foreground transition and apply immediately whenever an update is available. - `"onlyDownload"`: Check and download automatically, emit `updateAvailable`, and never set the next bundle or apply an update automatically. Instant apply modes (`"atInstall"`, `"onLaunch"`, `"always"`) apply while the user is waiting. Upload with `npx @capgo/cli@latest bundle upload --delta` so only changed files download. A full zip upload slows the user experience. These modes require `autoSplashscreen: true` and `@capacitor/splash-screen` installed with `launchAutoHide: false`. Only available for Android and iOS. | <code>true</code>
|
|
319
|
-
| **`resetWhenUpdate`** | <code>boolean</code> | Automatically delete previous downloaded bundles when a newer native app bundle is installed to the device. Setting this to false can broke the auto update flow if the user download from the store a native app bundle that is older than the current downloaded bundle. Upload will be prevented by channel setting downgrade_under_native. Only available for Android and iOS. | <code>true</code>
|
|
320
|
-
| **`updateUrl`** | <code>string</code> | Configure the URL / endpoint to which update checks are sent. Only available for Android and iOS. | <code>https://plugin.capgo.app/updates</code>
|
|
321
|
-
| **`channelUrl`** | <code>string</code> | Configure the URL / endpoint for channel operations. Only available for Android and iOS. | <code>https://plugin.capgo.app/channel_self</code>
|
|
322
|
-
| **`statsUrl`** | <code>string</code> | Configure the URL / endpoint to which update statistics are sent. Only available for Android and iOS. Set to "" to disable stats reporting. Native stats include update lifecycle events, app health signals such as crashes, Android ANRs, low-memory exits, iOS memory warnings, and WebView health signals such as JavaScript errors, unhandled promise rejections, resource load failures, WebView renderer exits, unclean WebView restarts, app launch readiness timing, and WebView load milestones when available.
|
|
323
|
-
| **`publicKey`** | <code>string</code> | Configure the public key for end to end live update encryption Version 2 Only available for Android and iOS. | <code>undefined</code>
|
|
324
|
-
| **`version`** | <code>string</code> | Configure the current version of the app. This will be used for the first update request. If not set, the plugin will get the version from the native code. Only available for Android and iOS. | <code>undefined</code>
|
|
325
|
-
| **`directUpdate`** | <code>boolean \| 'always' \| 'atInstall' \| 'onLaunch'</code> | Configure when the plugin should direct install updates. Only for autoUpdate mode. Instant apply (`atInstall`, `onLaunch`, `always`) should be uploaded with `--delta` so the update does not slow the user experience. A full zip, especially over 10MB, is relatively slow for users. These modes require `autoSplashscreen: true` and `@capacitor/splash-screen` installed with `launchAutoHide: false`. This flag makes the CLI upload delta in CI and ask for confirmation in local uploads. - false: Never do direct updates - atInstall: Same as `"atInstall"` for {@link autoUpdate} - onLaunch: Same as `"onLaunch"` for {@link autoUpdate} - always: Same as `"always"` for {@link autoUpdate} - true: (deprecated) Same as "always" for backward compatibility | <code>false</code>
|
|
326
|
-
| **`autoSplashscreen`** | <code>boolean</code> | Automatically hide the splashscreen after instant apply updates finish, or when no update is needed. Required when using instant apply modes (`"atInstall"`, `"onLaunch"`, `"always"`), including the deprecated `directUpdate` values `"atInstall"`, `"onLaunch"`, `"always"`, and `true`. `@capacitor/splash-screen` must be installed and configured with `launchAutoHide: false`. This removes the need to manually listen for appReady events and call SplashScreen.hide(). Only available for Android and iOS. | <code>false</code>
|
|
327
|
-
| **`autoSplashscreenLoader`** | <code>boolean</code> | Display a native loading indicator on top of the splashscreen while automatic direct updates are running. Only takes effect when {@link autoSplashscreen} is enabled. Requires the @capacitor/splash-screen plugin to be installed and configured with launchAutoHide: false. Only available for Android and iOS. | <code>false</code>
|
|
328
|
-
| **`autoSplashscreenTimeout`** | <code>number</code> | Automatically hide the splashscreen after the specified number of milliseconds when using automatic direct updates. If the timeout elapses, the update continues to download in the background while the splashscreen is dismissed. Set to `0` (zero) to disable the timeout. When the timeout fires, the direct update flow is skipped and the downloaded bundle is installed on the next background/launch. Requires {@link autoSplashscreen} to be enabled. Only available for Android and iOS. | <code>10000 // (10 seconds)</code>
|
|
329
|
-
| **`periodCheckDelay`** | <code>number</code> | Configure the interval in seconds for repeating update checks while the app stays open. Foreground checks still run when this is 0. Values below 600 are normalized to 600. Only available for Android and iOS. Cannot be less than 600 seconds (10 minutes). | <code>0 (disabled)</code>
|
|
330
|
-
| **`localS3`** | <code>boolean</code> | Configure the CLI to use a local server for testing or self-hosted update server. | <code>undefined</code>
|
|
331
|
-
| **`localHost`** | <code>string</code> | Configure the CLI to use a local server for testing or self-hosted update server. | <code>undefined</code>
|
|
332
|
-
| **`localWebHost`** | <code>string</code> | Configure the CLI to use a local server for testing or self-hosted update server. | <code>undefined</code>
|
|
333
|
-
| **`localSupa`** | <code>string</code> | Configure the CLI to use a local server for testing or self-hosted update server. | <code>undefined</code>
|
|
334
|
-
| **`localSupaAnon`** | <code>string</code> | Configure the CLI to use a local server for testing. | <code>undefined</code>
|
|
335
|
-
| **`localApi`** | <code>string</code> | Configure the CLI to use a local api for testing. | <code>undefined</code>
|
|
336
|
-
| **`localApiFiles`** | <code>string</code> | Configure the CLI to use a local file api for testing. | <code>undefined</code>
|
|
337
|
-
| **`allowModifyUrl`** | <code>boolean</code> | Allow the plugin to modify the updateUrl, statsUrl and channelUrl dynamically from the JavaScript side. | <code>false</code>
|
|
338
|
-
| **`
|
|
339
|
-
| **`
|
|
340
|
-
| **`
|
|
341
|
-
| **`
|
|
342
|
-
| **`
|
|
343
|
-
| **`
|
|
344
|
-
| **`
|
|
345
|
-
| **`
|
|
346
|
-
| **`
|
|
347
|
-
| **`
|
|
348
|
-
| **`
|
|
349
|
-
| **`
|
|
350
|
-
| **`
|
|
351
|
-
| **`
|
|
352
|
-
| **`
|
|
347
|
+
| Prop | Type | Description | Default | Since |
|
|
348
|
+
| -------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ------- |
|
|
349
|
+
| **`appReadyTimeout`** | <code>number</code> | Configure the number of milliseconds the native plugin should wait before considering an update 'failed'. Only available for Android and iOS. | <code>10000 // (10 seconds)</code> | |
|
|
350
|
+
| **`responseTimeout`** | <code>number</code> | Configure the number of seconds the native plugin should wait before considering an HTTP timeout. Applies to update checks and file downloads. On Android these are idle connect/read/write timeouts and do not cap total download time; on iOS the request timeout also bounds the total download duration. Only available for Android and iOS. | <code>20 // (20 second)</code> | |
|
|
351
|
+
| **`autoDeleteFailed`** | <code>boolean</code> | Configure whether the plugin should use automatically delete failed bundles. Only available for Android and iOS. | <code>true</code> | |
|
|
352
|
+
| **`autoDeletePrevious`** | <code>boolean</code> | Configure whether the plugin should use automatically delete previous bundles after a successful update. Only available for Android and iOS. | <code>true</code> | |
|
|
353
|
+
| **`autoUpdate`** | <code>boolean \| 'always' \| 'off' \| 'atBackground' \| 'atInstall' \| 'onLaunch' \| 'onlyDownload'</code> | Configure how the plugin checks for, downloads, and applies live updates. The plugin checks for updates when the app moves to the foreground. When {@link periodCheckDelay} is greater than 0, it also checks on a repeating timer while the app stays open. Boolean values keep their existing behavior: - `true`: Same as `"atBackground"`. - `false`: Same as `"off"`. String values merge the previous Auto Update and Direct Update configuration: - `"off"`: Disable automatic update checks. - `"atBackground"`: Check and download automatically on each foreground check, then apply the update the next time the app moves to background. - `"atInstall"`: Apply immediately only after a fresh install or native app store update; otherwise use `"atBackground"` behavior. - `"onLaunch"`: Apply immediately only when the app is brought to the foreground from a killed state (cold start). After that first check, fall back to `"atBackground"` behavior. - `"always"`: Check on every foreground transition and apply immediately whenever an update is available. - `"onlyDownload"`: Check and download automatically, emit `updateAvailable`, and never set the next bundle or apply an update automatically. Instant apply modes (`"atInstall"`, `"onLaunch"`, `"always"`) apply while the user is waiting. Upload with `npx @capgo/cli@latest bundle upload --delta` so only changed files download. A full zip upload slows the user experience. These modes require `autoSplashscreen: true` and `@capacitor/splash-screen` installed with `launchAutoHide: false`. Only available for Android and iOS. | <code>true</code> | |
|
|
354
|
+
| **`resetWhenUpdate`** | <code>boolean</code> | Automatically delete previous downloaded bundles when a newer native app bundle is installed to the device. Setting this to false can broke the auto update flow if the user download from the store a native app bundle that is older than the current downloaded bundle. Upload will be prevented by channel setting downgrade_under_native. Only available for Android and iOS. | <code>true</code> | |
|
|
355
|
+
| **`updateUrl`** | <code>string</code> | Configure the URL / endpoint to which update checks are sent. Only available for Android and iOS. | <code>https://plugin.capgo.app/updates</code> | |
|
|
356
|
+
| **`channelUrl`** | <code>string</code> | Configure the URL / endpoint for channel operations. Only available for Android and iOS. | <code>https://plugin.capgo.app/channel_self</code> | |
|
|
357
|
+
| **`statsUrl`** | <code>string</code> | Configure the URL / endpoint to which update statistics are sent. Only available for Android and iOS. Set to "" to disable stats reporting. Native stats include update lifecycle events, app health signals such as crashes, Android ANRs, low-memory exits, iOS memory warnings, and WebView health signals such as JavaScript errors, unhandled promise rejections, resource load failures, WebView renderer exits, unclean WebView restarts, app launch readiness timing, and WebView load milestones when available. Failed background update checks that never start a download (network errors, timeouts, non-2xx responses, unreadable payloads) are reported as `update_check_error` with `metadata.error` and optional `metadata.status_code`, not as `download_fail`. Self-hosted Capgo backends must allow the `update_check_error` stats action. | <code>https://plugin.capgo.app/stats</code> | |
|
|
358
|
+
| **`publicKey`** | <code>string</code> | Configure the public key for end to end live update encryption Version 2 Only available for Android and iOS. | <code>undefined</code> | 6.2.0 |
|
|
359
|
+
| **`version`** | <code>string</code> | Configure the current version of the app. This will be used for the first update request. If not set, the plugin will get the version from the native code. Only available for Android and iOS. | <code>undefined</code> | 4.17.48 |
|
|
360
|
+
| **`directUpdate`** | <code>boolean \| 'always' \| 'atInstall' \| 'onLaunch'</code> | Configure when the plugin should direct install updates. Only for autoUpdate mode. Instant apply (`atInstall`, `onLaunch`, `always`) should be uploaded with `--delta` so the update does not slow the user experience. A full zip, especially over 10MB, is relatively slow for users. These modes require `autoSplashscreen: true` and `@capacitor/splash-screen` installed with `launchAutoHide: false`. This flag makes the CLI upload delta in CI and ask for confirmation in local uploads. - false: Never do direct updates - atInstall: Same as `"atInstall"` for {@link autoUpdate} - onLaunch: Same as `"onLaunch"` for {@link autoUpdate} - always: Same as `"always"` for {@link autoUpdate} - true: (deprecated) Same as "always" for backward compatibility | <code>false</code> | 5.1.0 |
|
|
361
|
+
| **`autoSplashscreen`** | <code>boolean</code> | Automatically hide the splashscreen after instant apply updates finish, or when no update is needed. Required when using instant apply modes (`"atInstall"`, `"onLaunch"`, `"always"`), including the deprecated `directUpdate` values `"atInstall"`, `"onLaunch"`, `"always"`, and `true`. `@capacitor/splash-screen` must be installed and configured with `launchAutoHide: false`. This removes the need to manually listen for appReady events and call SplashScreen.hide(). Only available for Android and iOS. | <code>false</code> | 7.6.0 |
|
|
362
|
+
| **`autoSplashscreenLoader`** | <code>boolean</code> | Display a native loading indicator on top of the splashscreen while automatic direct updates are running. Only takes effect when {@link autoSplashscreen} is enabled. Requires the @capacitor/splash-screen plugin to be installed and configured with launchAutoHide: false. Only available for Android and iOS. | <code>false</code> | 7.19.0 |
|
|
363
|
+
| **`autoSplashscreenTimeout`** | <code>number</code> | Automatically hide the splashscreen after the specified number of milliseconds when using automatic direct updates. If the timeout elapses, the update continues to download in the background while the splashscreen is dismissed. Set to `0` (zero) to disable the timeout. When the timeout fires, the direct update flow is skipped and the downloaded bundle is installed on the next background/launch. Requires {@link autoSplashscreen} to be enabled. Only available for Android and iOS. | <code>10000 // (10 seconds)</code> | 7.19.0 |
|
|
364
|
+
| **`periodCheckDelay`** | <code>number</code> | Configure the interval in seconds for repeating update checks while the app stays open. Foreground checks still run when this is 0. Values below 600 are normalized to 600. Only available for Android and iOS. Cannot be less than 600 seconds (10 minutes). | <code>0 (disabled)</code> | |
|
|
365
|
+
| **`localS3`** | <code>boolean</code> | Configure the CLI to use a local server for testing or self-hosted update server. | <code>undefined</code> | 4.17.48 |
|
|
366
|
+
| **`localHost`** | <code>string</code> | Configure the CLI to use a local server for testing or self-hosted update server. | <code>undefined</code> | 4.17.48 |
|
|
367
|
+
| **`localWebHost`** | <code>string</code> | Configure the CLI to use a local server for testing or self-hosted update server. | <code>undefined</code> | 4.17.48 |
|
|
368
|
+
| **`localSupa`** | <code>string</code> | Configure the CLI to use a local server for testing or self-hosted update server. | <code>undefined</code> | 4.17.48 |
|
|
369
|
+
| **`localSupaAnon`** | <code>string</code> | Configure the CLI to use a local server for testing. | <code>undefined</code> | 4.17.48 |
|
|
370
|
+
| **`localApi`** | <code>string</code> | Configure the CLI to use a local api for testing. | <code>undefined</code> | 6.3.3 |
|
|
371
|
+
| **`localApiFiles`** | <code>string</code> | Configure the CLI to use a local file api for testing. | <code>undefined</code> | 6.3.3 |
|
|
372
|
+
| **`allowModifyUrl`** | <code>boolean</code> | Allow the plugin to modify the updateUrl, statsUrl and channelUrl dynamically from the JavaScript side. | <code>false</code> | 5.4.0 |
|
|
373
|
+
| **`allowHttpsToHttpRedirect`** | <code>boolean</code> | Allow the plugin to follow redirects from HTTPS to plain HTTP for its own network requests (update checks, stats, channel calls, and bundle/manifest downloads). Blocked by default so a redirect can never downgrade updater traffic to an unencrypted connection. Only enable this if your self-hosted update server or CDN must redirect to an HTTP URL. Direct HTTP URLs (for example `localApi` during development) are not affected. Only available for Android and iOS. | <code>false</code> | 8.52.0 |
|
|
374
|
+
| **`allowModifyAppId`** | <code>boolean</code> | Allow the plugin to modify the appId dynamically from the JavaScript side. | <code>false</code> | 7.14.0 |
|
|
375
|
+
| **`allowManualBundleError`** | <code>boolean</code> | Allow marking bundles as errored from JavaScript while using manual update flows. When enabled, {@link CapacitorUpdaterPlugin.setBundleError} can change a bundle status to `error`. | <code>false</code> | 7.20.0 |
|
|
376
|
+
| **`allowPreview`** | <code>boolean</code> | Allow JavaScript to start a native preview session and temporarily request updates for another app id. This is intended for trusted container apps that implement Expo Go-style preview flows. Only available for Android and iOS. | <code>false</code> | 8.47.0 |
|
|
377
|
+
| **`persistCustomId`** | <code>boolean</code> | Persist the customId set through {@link CapacitorUpdaterPlugin.setCustomId} across app restarts. Only available for Android and iOS. | <code>false (will be true by default in a future major release v8.x.x)</code> | 7.17.3 |
|
|
378
|
+
| **`persistModifyUrl`** | <code>boolean</code> | Persist the updateUrl, statsUrl and channelUrl set through {@link CapacitorUpdaterPlugin.setUpdateUrl}, {@link CapacitorUpdaterPlugin.setStatsUrl} and {@link CapacitorUpdaterPlugin.setChannelUrl} across app restarts. Only available for Android and iOS. | <code>false</code> | 7.20.0 |
|
|
379
|
+
| **`allowSetDefaultChannel`** | <code>boolean</code> | Allow or disallow the {@link CapacitorUpdaterPlugin.setChannel} method to modify the defaultChannel. When set to `false`, calling `setChannel()` will return an error with code `disabled_by_config`. | <code>true</code> | 7.34.0 |
|
|
380
|
+
| **`persistDefaultChannelOnReinstall`** | <code>boolean</code> | Keep the default channel stored by {@link CapacitorUpdaterPlugin.setChannel} or refreshed by {@link CapacitorUpdaterPlugin.getChannel} when app data is restored into a new app install. `setChannel()` and a successful `getChannel()` still persist the selected channel across app restarts. When this option is `false`, native startup clears that persisted channel when it detects app data restored into a new installation. Native build cleanup clears the persisted channel only when `persistDefaultChannelOnReinstall` is `false`, `resetWhenUpdate` is `true`, and the native build version has changed. Only available for Android and iOS. | <code>true</code> | 8.51.0 |
|
|
381
|
+
| **`defaultChannel`** | <code>string</code> | Set the default channel for the app in the config. Case sensitive. This will setting will override the default channel set in the cloud, but will still respect overrides made in the cloud. This requires the channel to allow devices to self dissociate/associate in the channel settings. https://capgo.app/docs/public-api/channels/#channel-configuration-options | <code>undefined</code> | 5.5.0 |
|
|
382
|
+
| **`appId`** | <code>string</code> | Configure the app id for the app in the config. | <code>undefined</code> | 6.0.0 |
|
|
383
|
+
| **`keepUrlPathAfterReload`** | <code>boolean</code> | Configure the plugin to keep the URL path after a reload. WARNING: When a reload is triggered, 'window.history' will be cleared. | <code>false</code> | 6.8.0 |
|
|
384
|
+
| **`disableJSLogging`** | <code>boolean</code> | Disable the JavaScript logging of the plugin. if true, the plugin will not log to the JavaScript console. only the native log will be done | <code>false</code> | 7.3.0 |
|
|
385
|
+
| **`osLogging`** | <code>boolean</code> | Enable OS-level logging. When enabled, logs are written to the system log which can be inspected in production builds. - **iOS**: Uses os_log instead of Swift.print, logs accessible via Console.app or Instruments - **Android**: Logs to Logcat (android.util.Log) When set to false, system logging is disabled on both platforms (only JavaScript console logging will occur if enabled). This is useful for debugging production apps (App Store/TestFlight builds on iOS, or production APKs on Android). | <code>true</code> | 8.42.0 |
|
|
386
|
+
| **`shakeMenu`** | <code>boolean</code> | Enable the native preview menu gesture while a preview session is active. Outside preview sessions this preview menu is ignored, unless {@link PluginsConfig.CapacitorUpdater.allowShakeChannelSelector} is enabled. | <code>false</code> | 7.5.0 |
|
|
387
|
+
| **`shakeMenuGesture`** | <code><a href="#shakemenugesture">ShakeMenuGesture</a></code> | Choose which native gesture opens the preview/channel menu. This applies to both {@link PluginsConfig.CapacitorUpdater.shakeMenu} and {@link PluginsConfig.CapacitorUpdater.allowShakeChannelSelector}. Only available for Android and iOS. | <code>'shake'</code> | 8.48.0 |
|
|
388
|
+
| **`allowShakeChannelSelector`** | <code>boolean</code> | Enable the native menu gesture to show a channel selector menu for switching between update channels. If {@link PluginsConfig.CapacitorUpdater.shakeMenu} is also enabled while a preview session is active, the shake menu includes both preview actions and channel switching. The native gesture can be changed with {@link PluginsConfig.CapacitorUpdater.shakeMenuGesture}. Only available for Android and iOS. | <code>false</code> | 8.43.0 |
|
|
389
|
+
| **`nativeUpdatePrompt`** | <code>boolean</code> | When enabled, show a native dialog prompting the user to install a newer native app from the App Store or Play Store. The prompt appears when a live update is blocked because the device native app is too old, including backend `disable_auto_update_*` responses, `store_update_required`, and `breakingAvailable` / `majorAvailable` flows. Only available for Android and iOS. No-op on web. | <code>false</code> | 8.53.0 |
|
|
390
|
+
| **`nativeUpdatePromptTitle`** | <code>string</code> | Optional title for the native store update dialog shown when {@link PluginsConfig.CapacitorUpdater.nativeUpdatePrompt} is enabled. Only available for Android and iOS. | <code>"Update available"</code> | 8.53.0 |
|
|
391
|
+
| **`nativeUpdatePromptMessage`** | <code>string</code> | Optional message body for the native store update dialog shown when {@link PluginsConfig.CapacitorUpdater.nativeUpdatePrompt} is enabled. Only available for Android and iOS. | <code>A short message explaining that a newer native app is available in the store.</code> | 8.53.0 |
|
|
392
|
+
| **`nativeUpdatePromptUpdateButton`** | <code>string</code> | Optional label for the primary action button that opens the store or starts an in-app update on Android. Only available for Android and iOS. | <code>"Update"</code> | 8.53.0 |
|
|
393
|
+
| **`nativeUpdatePromptLaterButton`** | <code>string</code> | Optional label for the dismiss action on the native store update dialog. Only available for Android and iOS. | <code>"Not now"</code> | 8.53.0 |
|
|
394
|
+
| **`nativeUpdatePromptCountry`** | <code>string</code> | Optional ISO 3166-1 alpha-2 country filter. When set, the prompt is shown only when the device region matches one of the comma-separated country codes (for example `"US"` or `"US,CA"`). Only available for Android and iOS. | <code>undefined (show in all regions)</code> | 8.53.0 |
|
|
395
|
+
| **`nativeUpdatePromptOnStoreCheck`** | <code>boolean</code> | When {@link PluginsConfig.CapacitorUpdater.nativeUpdatePrompt} is enabled, also show the dialog when {@link CapacitorUpdaterPlugin.getAppUpdateInfo} reports that a store update is available. Only available for Android and iOS. | <code>false</code> | 8.53.0 |
|
|
396
|
+
| **`nativeUpdatePromptCooldownHours`** | <code>number</code> | Minimum hours between native update prompts for the same native app version. Also limited to once per app session. Only available for Android and iOS. | <code>24</code> | 8.53.0 |
|
|
353
397
|
|
|
354
398
|
### Examples
|
|
355
399
|
|
|
@@ -383,6 +427,7 @@ In `capacitor.config.json`:
|
|
|
383
427
|
"localApi": undefined,
|
|
384
428
|
"localApiFiles": undefined,
|
|
385
429
|
"allowModifyUrl": undefined,
|
|
430
|
+
"allowHttpsToHttpRedirect": undefined,
|
|
386
431
|
"allowModifyAppId": undefined,
|
|
387
432
|
"allowManualBundleError": undefined,
|
|
388
433
|
"allowPreview": undefined,
|
|
@@ -397,7 +442,15 @@ In `capacitor.config.json`:
|
|
|
397
442
|
"osLogging": undefined,
|
|
398
443
|
"shakeMenu": undefined,
|
|
399
444
|
"shakeMenuGesture": undefined,
|
|
400
|
-
"allowShakeChannelSelector": undefined
|
|
445
|
+
"allowShakeChannelSelector": undefined,
|
|
446
|
+
"nativeUpdatePrompt": undefined,
|
|
447
|
+
"nativeUpdatePromptTitle": undefined,
|
|
448
|
+
"nativeUpdatePromptMessage": undefined,
|
|
449
|
+
"nativeUpdatePromptUpdateButton": undefined,
|
|
450
|
+
"nativeUpdatePromptLaterButton": undefined,
|
|
451
|
+
"nativeUpdatePromptCountry": undefined,
|
|
452
|
+
"nativeUpdatePromptOnStoreCheck": undefined,
|
|
453
|
+
"nativeUpdatePromptCooldownHours": undefined
|
|
401
454
|
}
|
|
402
455
|
}
|
|
403
456
|
}
|
|
@@ -437,6 +490,7 @@ const config: CapacitorConfig = {
|
|
|
437
490
|
localApi: undefined,
|
|
438
491
|
localApiFiles: undefined,
|
|
439
492
|
allowModifyUrl: undefined,
|
|
493
|
+
allowHttpsToHttpRedirect: undefined,
|
|
440
494
|
allowModifyAppId: undefined,
|
|
441
495
|
allowManualBundleError: undefined,
|
|
442
496
|
allowPreview: undefined,
|
|
@@ -452,6 +506,14 @@ const config: CapacitorConfig = {
|
|
|
452
506
|
shakeMenu: undefined,
|
|
453
507
|
shakeMenuGesture: undefined,
|
|
454
508
|
allowShakeChannelSelector: undefined,
|
|
509
|
+
nativeUpdatePrompt: undefined,
|
|
510
|
+
nativeUpdatePromptTitle: undefined,
|
|
511
|
+
nativeUpdatePromptMessage: undefined,
|
|
512
|
+
nativeUpdatePromptUpdateButton: undefined,
|
|
513
|
+
nativeUpdatePromptLaterButton: undefined,
|
|
514
|
+
nativeUpdatePromptCountry: undefined,
|
|
515
|
+
nativeUpdatePromptOnStoreCheck: undefined,
|
|
516
|
+
nativeUpdatePromptCooldownHours: undefined,
|
|
455
517
|
},
|
|
456
518
|
},
|
|
457
519
|
};
|
|
@@ -502,6 +564,7 @@ export default config;
|
|
|
502
564
|
* [`getPluginVersion()`](#getpluginversion)
|
|
503
565
|
* [`isAutoUpdateEnabled()`](#isautoupdateenabled)
|
|
504
566
|
* [`removeAllListeners()`](#removealllisteners)
|
|
567
|
+
* [`addListener('updaterEvent', ...)`](#addlistenerupdaterevent-)
|
|
505
568
|
* [`addListener('download', ...)`](#addlistenerdownload-)
|
|
506
569
|
* [`addListener('noNeedUpdate', ...)`](#addlistenernoneedupdate-)
|
|
507
570
|
* [`addListener('updateCheckResult', ...)`](#addlistenerupdatecheckresult-)
|
|
@@ -1067,16 +1130,17 @@ setMultiDelay(options: MultiDelayConditions) => Promise<void>
|
|
|
1067
1130
|
Configure conditions that must be met before a pending update is applied.
|
|
1068
1131
|
|
|
1069
1132
|
After calling {@link next} to queue an update, use this method to control when it gets applied.
|
|
1070
|
-
|
|
1133
|
+
By default, the update is installed only after **all** specified conditions are satisfied (`conditionMode: 'and'`).
|
|
1134
|
+
Set `conditionMode` to `'or'` to apply the update as soon as **any** condition is met.
|
|
1071
1135
|
|
|
1072
1136
|
Available condition types:
|
|
1073
|
-
- `background`: Wait
|
|
1074
|
-
- `kill`:
|
|
1137
|
+
- `background`: Wait until the app has spent more than the configured time in the background (see value formats below).
|
|
1138
|
+
- `kill`: The condition clears on the next launch and can also clear during Android activity destruction; activity destruction does not prove that the app process ended. Automatic installation waits for the next background, because it runs from appMovedToBackground. Calling {@link reload} can apply the pending bundle immediately.
|
|
1075
1139
|
- `date`: Wait until a specific date/time (ISO 8601 format)
|
|
1076
1140
|
- `nativeVersion`: Wait until the native app is updated to a specific version
|
|
1077
1141
|
|
|
1078
1142
|
Condition value formats:
|
|
1079
|
-
- `background`:
|
|
1143
|
+
- `background`: Time in milliseconds in background must exceed this value before the condition can clear on return to foreground (e.g., `"300000"` for more than 5 minutes; exactly `300000` ms does not clear). Omit `value` or use `"0"` to clear after one background-and-return cycle; the update installs on the following background.
|
|
1080
1144
|
- `kill`: No value needed
|
|
1081
1145
|
- `date`: ISO 8601 date string (e.g., `"2025-12-31T23:59:59Z"`)
|
|
1082
1146
|
- `nativeVersion`: Version string (e.g., `"2.0.0"`)
|
|
@@ -1556,6 +1620,7 @@ removeAllListeners() => Promise<void>
|
|
|
1556
1620
|
Remove all event listeners registered for this plugin.
|
|
1557
1621
|
|
|
1558
1622
|
This unregisters all listeners added via {@link addListener} for all event types:
|
|
1623
|
+
- `updaterEvent`
|
|
1559
1624
|
- `download`
|
|
1560
1625
|
- `noNeedUpdate`
|
|
1561
1626
|
- `updateCheckResult`
|
|
@@ -1575,6 +1640,46 @@ to prevent memory leaks from lingering event listeners.
|
|
|
1575
1640
|
--------------------
|
|
1576
1641
|
|
|
1577
1642
|
|
|
1643
|
+
#### addListener('updaterEvent', ...)
|
|
1644
|
+
|
|
1645
|
+
```typescript
|
|
1646
|
+
addListener(eventName: 'updaterEvent', listenerFunc: (event: UpdaterEvent) => void) => Promise<PluginListenerHandle>
|
|
1647
|
+
```
|
|
1648
|
+
|
|
1649
|
+
Listen for every updater event with a single listener.
|
|
1650
|
+
|
|
1651
|
+
Each call receives `{ type, data }`: `type` is the event name (`download`, `updateAvailable`,
|
|
1652
|
+
`downloadFailed`, `appReady`, ...) and `data` is the payload the matching legacy listener receives.
|
|
1653
|
+
When the native layer retains an event until a listener attaches (for example `set` and `appReady`),
|
|
1654
|
+
`updaterEvent` gets the same retention.
|
|
1655
|
+
|
|
1656
|
+
The per-event listeners below are deprecated and will be removed in v9.
|
|
1657
|
+
|
|
1658
|
+
```typescript
|
|
1659
|
+
CapacitorUpdater.addListener('updaterEvent', (event) => {
|
|
1660
|
+
switch (event.type) {
|
|
1661
|
+
case 'download':
|
|
1662
|
+
console.log('progress', event.data.percent);
|
|
1663
|
+
break;
|
|
1664
|
+
case 'downloadFailed':
|
|
1665
|
+
console.warn('download failed', event.data.version);
|
|
1666
|
+
break;
|
|
1667
|
+
}
|
|
1668
|
+
});
|
|
1669
|
+
```
|
|
1670
|
+
|
|
1671
|
+
| Param | Type |
|
|
1672
|
+
| ------------------ | ------------------------------------------------------------------------- |
|
|
1673
|
+
| **`eventName`** | <code>'updaterEvent'</code> |
|
|
1674
|
+
| **`listenerFunc`** | <code>(event: <a href="#updaterevent">UpdaterEvent</a>) => void</code> |
|
|
1675
|
+
|
|
1676
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
1677
|
+
|
|
1678
|
+
**Since:** 8.53.0
|
|
1679
|
+
|
|
1680
|
+
--------------------
|
|
1681
|
+
|
|
1682
|
+
|
|
1578
1683
|
#### addListener('download', ...)
|
|
1579
1684
|
|
|
1580
1685
|
```typescript
|
|
@@ -1627,7 +1732,8 @@ The backend can classify the <a href="#updatecheckresultevent">UpdateCheckResult
|
|
|
1627
1732
|
|
|
1628
1733
|
This event is emitted alongside legacy events. For `up_to_date` and `blocked`, it is emitted before
|
|
1629
1734
|
`noNeedUpdate` and does not emit `downloadFailed`. For `failed`, it is emitted before the legacy
|
|
1630
|
-
`downloadFailed` event
|
|
1735
|
+
`downloadFailed` event; native code also sends an `update_check_error` stat (with error metadata)
|
|
1736
|
+
instead of `download_fail`, because no bundle download was attempted.
|
|
1631
1737
|
|
|
1632
1738
|
| Param | Type |
|
|
1633
1739
|
| ------------------ | --------------------------------------------------------------------------------------------- |
|
|
@@ -2462,9 +2568,10 @@ If you don't use backend, you need to provide the URL and version of the bundle.
|
|
|
2462
2568
|
|
|
2463
2569
|
##### MultiDelayConditions
|
|
2464
2570
|
|
|
2465
|
-
| Prop | Type
|
|
2466
|
-
| --------------------- |
|
|
2467
|
-
| **`delayConditions`** | <code>DelayCondition[]</code>
|
|
2571
|
+
| Prop | Type | Description | Default | Since |
|
|
2572
|
+
| --------------------- | ----------------------------------------------------------------- | ----------------------------------------- | ------------------ | ------ |
|
|
2573
|
+
| **`delayConditions`** | <code>DelayCondition[]</code> | | | |
|
|
2574
|
+
| **`conditionMode`** | <code><a href="#delayconditionmode">DelayConditionMode</a></code> | How to combine multiple delay conditions. | <code>'and'</code> | 8.50.0 |
|
|
2468
2575
|
|
|
2469
2576
|
|
|
2470
2577
|
##### DelayCondition
|
|
@@ -2699,6 +2806,13 @@ Result returned after requesting an immediate native auto-update check.
|
|
|
2699
2806
|
| **`bundle`** | <code><a href="#bundleinfo">BundleInfo</a></code> | Emit when a new update is available. | 4.0.0 |
|
|
2700
2807
|
|
|
2701
2808
|
|
|
2809
|
+
##### DownloadFailedEvent
|
|
2810
|
+
|
|
2811
|
+
| Prop | Type | Description | Since |
|
|
2812
|
+
| ------------- | ------------------- | -------------------------- | ----- |
|
|
2813
|
+
| **`version`** | <code>string</code> | Emit when a download fail. | 4.0.0 |
|
|
2814
|
+
|
|
2815
|
+
|
|
2702
2816
|
##### MajorAvailableEvent
|
|
2703
2817
|
|
|
2704
2818
|
| Prop | Type | Description | Since |
|
|
@@ -2727,13 +2841,6 @@ Result returned after requesting an immediate native auto-update check.
|
|
|
2727
2841
|
| **`bundle`** | <code><a href="#bundleinfo">BundleInfo</a></code> | Emit when a bundle is queued as the next bundle to install. | 6.14.0 |
|
|
2728
2842
|
|
|
2729
2843
|
|
|
2730
|
-
##### DownloadFailedEvent
|
|
2731
|
-
|
|
2732
|
-
| Prop | Type | Description | Since |
|
|
2733
|
-
| ------------- | ------------------- | -------------------------- | ----- |
|
|
2734
|
-
| **`version`** | <code>string</code> | Emit when a download fail. | 4.0.0 |
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
2844
|
##### AppReadyEvent
|
|
2738
2845
|
|
|
2739
2846
|
| Prop | Type | Description | Since |
|
|
@@ -2877,6 +2984,16 @@ error: The bundle has failed to download.
|
|
|
2877
2984
|
<code>'background' | 'kill' | 'nativeVersion' | 'date'</code>
|
|
2878
2985
|
|
|
2879
2986
|
|
|
2987
|
+
##### DelayConditionMode
|
|
2988
|
+
|
|
2989
|
+
How multiple delay conditions are combined when more than one is set.
|
|
2990
|
+
|
|
2991
|
+
- `and`: every condition must be satisfied before the pending update is applied (default, backward compatible).
|
|
2992
|
+
- `or`: the pending update is applied as soon as any condition is satisfied.
|
|
2993
|
+
|
|
2994
|
+
<code>'and' | 'or'</code>
|
|
2995
|
+
|
|
2996
|
+
|
|
2880
2997
|
##### UpdateResponseKind
|
|
2881
2998
|
|
|
2882
2999
|
Classification for update-check responses that do not provide a downloadable bundle.
|
|
@@ -2886,6 +3003,17 @@ failed by native clients.
|
|
|
2886
3003
|
<code>'up_to_date' | 'blocked' | 'failed'</code>
|
|
2887
3004
|
|
|
2888
3005
|
|
|
3006
|
+
##### UpdaterEvent
|
|
3007
|
+
|
|
3008
|
+
Payload of the single `updaterEvent` listener: every plugin event as `{ type, data }`.
|
|
3009
|
+
`type` is the legacy event name and `data` is the same payload the legacy listener receives,
|
|
3010
|
+
so you can switch on `type` and get a typed `data`.
|
|
3011
|
+
|
|
3012
|
+
The deprecated `majorAvailable` alias is not forwarded: use `breakingAvailable`.
|
|
3013
|
+
|
|
3014
|
+
<code>{ type: 'download'; data: <a href="#downloadevent">DownloadEvent</a> } | { type: 'noNeedUpdate'; data: <a href="#noneedevent">NoNeedEvent</a> } | { type: 'updateCheckResult'; data: <a href="#updatecheckresultevent">UpdateCheckResultEvent</a> } | { type: 'updateAvailable'; data: <a href="#updateavailableevent">UpdateAvailableEvent</a> } | { type: 'downloadComplete'; data: <a href="#downloadcompleteevent">DownloadCompleteEvent</a> } | { type: 'downloadFailed'; data: <a href="#downloadfailedevent">DownloadFailedEvent</a> } | { type: 'breakingAvailable'; data: <a href="#breakingavailableevent">BreakingAvailableEvent</a> } | { type: 'updateFailed'; data: <a href="#updatefailedevent">UpdateFailedEvent</a> } | { type: 'set'; data: <a href="#setevent">SetEvent</a> } | { type: 'setNext'; data: <a href="#setnextevent">SetNextEvent</a> } | { type: 'appReloaded'; data: <a href="#record">Record</a><string, never> } | { type: 'appReady'; data: <a href="#appreadyevent">AppReadyEvent</a> } | { type: 'channelPrivate'; data: <a href="#channelprivateevent">ChannelPrivateEvent</a> } | { type: 'onFlexibleUpdateStateChange'; data: <a href="#flexibleupdatestate">FlexibleUpdateState</a> }</code>
|
|
3015
|
+
|
|
3016
|
+
|
|
2889
3017
|
##### BreakingAvailableEvent
|
|
2890
3018
|
|
|
2891
3019
|
Payload emitted by {@link CapacitorUpdaterPlugin.addListener} with `breakingAvailable`.
|
|
@@ -2893,6 +3021,13 @@ Payload emitted by {@link CapacitorUpdaterPlugin.addListener} with `breakingAvai
|
|
|
2893
3021
|
<code><a href="#majoravailableevent">MajorAvailableEvent</a></code>
|
|
2894
3022
|
|
|
2895
3023
|
|
|
3024
|
+
##### Record
|
|
3025
|
+
|
|
3026
|
+
Construct a type with a set of properties K of type T
|
|
3027
|
+
|
|
3028
|
+
<code>{
|
|
2896
3029
|
[P in K]: T;
|
|
2897
3030
|
}</code>
|
|
3031
|
+
|
|
3032
|
+
|
|
2898
3033
|
##### ShakeMenuGesture
|
|
2899
3034
|
|
|
2900
3035
|
Native gesture options that open the shake menu.
|