@capgo/capacitor-updater 8.54.2 → 9.0.1
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 +2 -2
- package/Package.swift +3 -4
- package/README.md +162 -417
- package/android/build.gradle +7 -7
- package/android/consumer-rules.pro +48 -0
- package/android/proguard-rules.pro +1 -23
- package/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdaterPlugin.java +1420 -404
- package/android/src/main/java/ee/forgr/capacitor_updater/CapgoUpdater.java +1100 -308
- package/android/src/main/java/ee/forgr/capacitor_updater/CryptoCipher.java +102 -65
- package/android/src/main/java/ee/forgr/capacitor_updater/DownloadService.java +155 -18
- package/android/src/main/java/ee/forgr/capacitor_updater/DownloadWorkerManager.java +22 -2
- package/android/src/main/java/ee/forgr/capacitor_updater/HeadlessUpdateWorker.java +82 -21
- package/android/src/main/java/ee/forgr/capacitor_updater/Http3.java +356 -0
- package/android/src/main/java/ee/forgr/capacitor_updater/HttpEngineTransport.java +553 -0
- package/dist/docs.json +44 -566
- package/dist/esm/definitions.d.ts +97 -215
- package/dist/esm/definitions.js.map +1 -1
- package/ios/Sources/CapacitorUpdaterPlugin/CapacitorUpdaterPlugin.swift +197 -84
- package/ios/Sources/CapacitorUpdaterPlugin/CapgoUpdater.swift +402 -139
- package/ios/Sources/CapacitorUpdaterPlugin/CryptoCipher.swift +81 -55
- package/ios/Sources/CapacitorUpdaterPlugin/RedirectPolicyDelegate.swift +24 -0
- package/ios/Sources/CapacitorUpdaterPlugin/ShakeMenu.swift +2 -1
- package/ios/Sources/CapacitorUpdaterPlugin/WKWebView+CapgoObjcBridge.swift +20 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/BuiltinHashesTests.swift +210 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/BundleHardeningTests.swift +292 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/CapacitorUpdaterPluginTests.swift +3905 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/CapgoSemanticVersionTests.swift +64 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/ChecksumRequiredTests.swift +151 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/CliCryptoFixtureTests.swift +249 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/HttpsOnlyBuiltinMinimumTests.swift +528 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/InstallPerfTests.swift +174 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/ListChannelsTests.swift +74 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/LoggerSecurityTests.swift +149 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/NativeContractTests.swift +160 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/NetworkTransportTests.swift +1095 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/PopulateDeltaCacheTests.swift +573 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/RedirectPolicyTests.swift +63 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/RsaContractTests.swift +281 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/SessionKeyRequiredTests.swift +192 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/TestZipWriter.swift +235 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/UpdateLifecycleTests.swift +454 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/WebKitOverlayGuardTests.swift +32 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/ZipArchiveReaderTests.swift +302 -0
- package/ios/Tests/CapacitorUpdaterPluginTests/ZipBundleExtractionTests.swift +122 -0
- package/package.json +15 -13
package/dist/docs.json
CHANGED
|
@@ -618,7 +618,7 @@
|
|
|
618
618
|
"text": "{Error} If the reload operation fails."
|
|
619
619
|
}
|
|
620
620
|
],
|
|
621
|
-
"docs": "Manually reload the app to apply a pending update.\n\nThis triggers the same reload behavior that happens automatically when the app backgrounds.\nIf you've called {@link next} to queue an update, calling `reload()` will apply it immediately.\n\n**IMPORTANT: This destroys the current JavaScript context immediately.**\nSee {@link set} for details on the implications of this operation.\n\nCommon use cases:\n- Applying an update immediately after download instead of waiting for backgrounding\n- Providing a \"Restart now\" button to users after an update is ready\n- Testing update flows during development\n\nIf no update is pending (no call to {@link next}), this simply reloads the current bundle.",
|
|
621
|
+
"docs": "Manually reload the app to apply a pending update.\n\nThis triggers the same reload behavior that happens automatically when the app backgrounds.\nIf you've called {@link next} to queue an update, calling `reload()` will apply it immediately.\n\n**IMPORTANT: This destroys the current JavaScript context immediately.**\nSee {@link set} for details on the implications of this operation.\n\nCommon use cases:\n- Applying an update immediately after download instead of waiting for backgrounding\n- Providing a \"Restart now\" button to users after an update is ready\n- Testing update flows during development\n\nIf no update is pending (no call to {@link next}), this simply reloads the current bundle.\nIf `builtinMinimum` rejects a pending bundle below the native version, the promise rejects with\ncode `VERSION_BELOW_NATIVE` and a message naming both versions. The current bundle and pending\nupdate remain unchanged, so you can reset to builtin or choose another bundle.",
|
|
622
622
|
"complexTypes": [],
|
|
623
623
|
"slug": "reload"
|
|
624
624
|
},
|
|
@@ -703,7 +703,7 @@
|
|
|
703
703
|
"text": "Whether a native update check was queued."
|
|
704
704
|
}
|
|
705
705
|
],
|
|
706
|
-
"docs": "Trigger the native auto-update check/download pipeline immediately.\n\nThis starts the same background update flow used when the app moves to the\nforeground with auto-update enabled. It is useful for native integrations\nsuch as a silent push notification asking the app to check for a Capgo\nbundle without reimplementing the update protocol in JavaScript.\n\nThe promise resolves after the native background work has been queued, not\nafter the update has been downloaded or installed. Listen to
|
|
706
|
+
"docs": "Trigger the native auto-update check/download pipeline immediately.\n\nThis starts the same background update flow used when the app moves to the\nforeground with auto-update enabled. It is useful for native integrations\nsuch as a silent push notification asking the app to check for a Capgo\nbundle without reimplementing the update protocol in JavaScript.\n\nThe promise resolves after the native background work has been queued, not\nafter the update has been downloaded or installed. Listen to `updaterEvent`\nand its `updateAvailable`, `downloadComplete`, `downloadFailed`, and\n`noNeedUpdate` types for the final result.\n\nNative support is available on iOS and Android. On Web, this method returns\na result with `status: 'unavailable'`. Native platforms also return\n`unavailable` when the native auto-update system is disabled.",
|
|
707
707
|
"complexTypes": [
|
|
708
708
|
"TriggerUpdateCheckResult"
|
|
709
709
|
],
|
|
@@ -846,7 +846,7 @@
|
|
|
846
846
|
"text": "4.7.0"
|
|
847
847
|
}
|
|
848
848
|
],
|
|
849
|
-
"docs": "Assign this device to a specific update channel at runtime.\n\nChannels allow you to distribute different bundle versions to different groups of users\n(e.g., \"production\", \"beta\", \"staging\"). This method switches the device to a new channel.\n\n**Device Override UI:** `setChannel()` validates the channel with the backend, then stores the\nselected channel locally on the device for future app restarts. It does not create or update\na backend Device Override, so the device will not appear as overridden in the Capgo dashboard.\nOnly assignments created from the dashboard or the Public API are shown in the Device Override UI.\n\n**Requirements:**\n- The target channel must allow self-assignment (configured in your Capgo dashboard or backend)\n- The backend may accept or reject the request based on channel settings\n\n**When to use:**\n- After the app is ready and the user has interacted (e.g., opted into beta program)\n- To implement in-app channel switching (beta toggle, tester access, etc.)\n- For user-driven channel changes\n\n**When NOT to use:**\n- At app boot/initialization - use {@link PluginsConfig.CapacitorUpdater.defaultChannel} config instead\n- Before user interaction\n\n**Important: Listen for the `channelPrivate` event**\n\nWhen a user attempts to set a channel that doesn't allow device self-assignment, the method will\nthrow an error AND
|
|
849
|
+
"docs": "Assign this device to a specific update channel at runtime.\n\nChannels allow you to distribute different bundle versions to different groups of users\n(e.g., \"production\", \"beta\", \"staging\"). This method switches the device to a new channel.\n\n**Device Override UI:** `setChannel()` validates the channel with the backend, then stores the\nselected channel locally on the device for future app restarts. It does not create or update\na backend Device Override, so the device will not appear as overridden in the Capgo dashboard.\nOnly assignments created from the dashboard or the Public API are shown in the Device Override UI.\n\n**Requirements:**\n- The target channel must allow self-assignment (configured in your Capgo dashboard or backend)\n- The backend may accept or reject the request based on channel settings\n\n**When to use:**\n- After the app is ready and the user has interacted (e.g., opted into beta program)\n- To implement in-app channel switching (beta toggle, tester access, etc.)\n- For user-driven channel changes\n\n**When NOT to use:**\n- At app boot/initialization - use {@link PluginsConfig.CapacitorUpdater.defaultChannel} config instead\n- Before user interaction\n\n**Important: Listen for the `channelPrivate` event**\n\nWhen a user attempts to set a channel that doesn't allow device self-assignment, the method will\nthrow an error AND emit a `channelPrivate` {@link UpdaterEvent}. You should listen to this event\nto provide appropriate feedback to users:\n\n```typescript\nCapacitorUpdater.addListener('updaterEvent', (event) => {\n if (event.type === 'channelPrivate') {\n console.warn(`Cannot access channel \"${event.data.channel}\": ${event.data.message}`);\n // Show user-friendly message\n }\n});\n```\n\nThis sends a request to the Capgo backend to validate the specified channel, then stores the\nchannel locally on the device for future app restarts.",
|
|
850
850
|
"complexTypes": [
|
|
851
851
|
"ChannelRes",
|
|
852
852
|
"SetChannelOptions"
|
|
@@ -911,7 +911,7 @@
|
|
|
911
911
|
"text": "4.8.0"
|
|
912
912
|
}
|
|
913
913
|
],
|
|
914
|
-
"docs": "Get the current channel assigned to this device.\n\nReturns information about:\n- `channel`: The currently assigned channel name (if any)\n- `allowSet`: Whether the channel allows self-assignment\n- `status`: Operation status\n- `error`/`message`: Additional information (if applicable)\n\nUse this to:\n- Display current channel to users (e.g., \"You're on the Beta channel\")\n- Check if a device is on a specific channel before showing features\n- Verify channel assignment after calling {@link setChannel}\n\nOn native platforms, a successful response also refreshes the
|
|
914
|
+
"docs": "Get the current channel assigned to this device.\n\nReturns information about:\n- `channel`: The currently assigned channel name (if any)\n- `allowSet`: Whether the channel allows self-assignment\n- `status`: Operation status\n- `error`/`message`: Additional information (if applicable)\n\nUse this to:\n- Display current channel to users (e.g., \"You're on the Beta channel\")\n- Check if a device is on a specific channel before showing features\n- Verify channel assignment after calling {@link setChannel}\n\nOn native platforms, a successful response with a device channel override also refreshes the\ndefault channel used by update checks. Responses with `status: 'default'` are reported only and\nare not persisted. This refresh is persisted across app restarts.",
|
|
915
915
|
"complexTypes": [
|
|
916
916
|
"GetChannelRes"
|
|
917
917
|
],
|
|
@@ -971,7 +971,7 @@
|
|
|
971
971
|
"text": "4.9.0"
|
|
972
972
|
}
|
|
973
973
|
],
|
|
974
|
-
"docs": "Set a custom identifier for this device.\n\nThis allows you to identify devices by your own custom ID (user ID, account ID, etc.)\ninstead of or in addition to the device's unique hardware ID. The custom ID is sent\nto your update server and can be used for:\n- Targeting specific users for updates\n- Analytics and user tracking\n- Debugging and support (correlating devices with users)\n- A/B testing or feature flagging\n\n**Persistence:**\n- When {@link PluginsConfig.CapacitorUpdater.persistCustomId} is `true
|
|
974
|
+
"docs": "Set a custom identifier for this device.\n\nThis allows you to identify devices by your own custom ID (user ID, account ID, etc.)\ninstead of or in addition to the device's unique hardware ID. The custom ID is sent\nto your update server and can be used for:\n- Targeting specific users for updates\n- Analytics and user tracking\n- Debugging and support (correlating devices with users)\n- A/B testing or feature flagging\n\n**Persistence:**\n- When {@link PluginsConfig.CapacitorUpdater.persistCustomId} is `true` (the default), the ID persists across app restarts\n- When `false`, the ID is only kept for the current session\n\n**Clearing the custom ID:**\n- Pass an empty string `\"\"` to remove any stored custom ID, even when persistence is disabled",
|
|
975
975
|
"complexTypes": [
|
|
976
976
|
"SetCustomIdOptions"
|
|
977
977
|
],
|
|
@@ -1076,7 +1076,7 @@
|
|
|
1076
1076
|
"text": "1.0.0"
|
|
1077
1077
|
}
|
|
1078
1078
|
],
|
|
1079
|
-
"docs": "Remove all event listeners registered for this plugin.\n\nThis unregisters
|
|
1079
|
+
"docs": "Remove all event listeners registered for this plugin.\n\nThis unregisters every listener added via {@link addListener}, including all\n`updaterEvent` listeners.\n\nUse this during cleanup (e.g., when unmounting components or closing screens)\nto prevent memory leaks from lingering event listeners.",
|
|
1080
1080
|
"complexTypes": [],
|
|
1081
1081
|
"slug": "removealllisteners"
|
|
1082
1082
|
},
|
|
@@ -1102,507 +1102,13 @@
|
|
|
1102
1102
|
"text": "8.53.0"
|
|
1103
1103
|
}
|
|
1104
1104
|
],
|
|
1105
|
-
"docs": "Listen for every updater event with a single listener.\n\nEach call receives `{ type, data }`: `type` is the event name
|
|
1105
|
+
"docs": "Listen for every updater event with a single listener.\n\nEach call receives `{ type, data }`: `type` is the event name and `data` is its payload\n(see {@link UpdaterEvent} for every type and its payload).\n\nSince 9.0.0 this is the only listener the plugin emits. The per-event listeners\n(`addListener('download', ...)`, `addListener('appReady', ...)`, ...) and the `majorAvailable`\nalias were removed: switch on `event.type` instead.\n\n`set` and `appReady` are retained natively until a listener attaches, so they are still\ndelivered after a reload even when the listener is registered later in app startup.\n\n```typescript\nCapacitorUpdater.addListener('updaterEvent', (event) => {\n switch (event.type) {\n case 'download':\n console.log('progress', event.data.percent);\n break;\n case 'downloadFailed':\n console.warn('download failed', event.data.version);\n break;\n case 'channelPrivate':\n console.warn(`Cannot access channel \"${event.data.channel}\": ${event.data.message}`);\n break;\n }\n});\n```",
|
|
1106
1106
|
"complexTypes": [
|
|
1107
1107
|
"PluginListenerHandle",
|
|
1108
1108
|
"UpdaterEvent"
|
|
1109
1109
|
],
|
|
1110
1110
|
"slug": "addlistenerupdaterevent-"
|
|
1111
1111
|
},
|
|
1112
|
-
{
|
|
1113
|
-
"name": "addListener",
|
|
1114
|
-
"signature": "(eventName: 'download', listenerFunc: (state: DownloadEvent) => void) => Promise<PluginListenerHandle>",
|
|
1115
|
-
"parameters": [
|
|
1116
|
-
{
|
|
1117
|
-
"name": "eventName",
|
|
1118
|
-
"docs": "",
|
|
1119
|
-
"type": "'download'"
|
|
1120
|
-
},
|
|
1121
|
-
{
|
|
1122
|
-
"name": "listenerFunc",
|
|
1123
|
-
"docs": "",
|
|
1124
|
-
"type": "(state: DownloadEvent) => void"
|
|
1125
|
-
}
|
|
1126
|
-
],
|
|
1127
|
-
"returns": "Promise<PluginListenerHandle>",
|
|
1128
|
-
"tags": [
|
|
1129
|
-
{
|
|
1130
|
-
"name": "deprecated",
|
|
1131
|
-
"text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
|
|
1132
|
-
},
|
|
1133
|
-
{
|
|
1134
|
-
"name": "since",
|
|
1135
|
-
"text": "2.0.11"
|
|
1136
|
-
}
|
|
1137
|
-
],
|
|
1138
|
-
"docs": "Listen for bundle download event in the App. Fires once a download has started, during downloading and when finished.\nThis will return you all download percent during the download",
|
|
1139
|
-
"complexTypes": [
|
|
1140
|
-
"PluginListenerHandle",
|
|
1141
|
-
"DownloadEvent"
|
|
1142
|
-
],
|
|
1143
|
-
"slug": "addlistenerdownload-"
|
|
1144
|
-
},
|
|
1145
|
-
{
|
|
1146
|
-
"name": "addListener",
|
|
1147
|
-
"signature": "(eventName: 'noNeedUpdate', listenerFunc: (state: NoNeedEvent) => void) => Promise<PluginListenerHandle>",
|
|
1148
|
-
"parameters": [
|
|
1149
|
-
{
|
|
1150
|
-
"name": "eventName",
|
|
1151
|
-
"docs": "",
|
|
1152
|
-
"type": "'noNeedUpdate'"
|
|
1153
|
-
},
|
|
1154
|
-
{
|
|
1155
|
-
"name": "listenerFunc",
|
|
1156
|
-
"docs": "",
|
|
1157
|
-
"type": "(state: NoNeedEvent) => void"
|
|
1158
|
-
}
|
|
1159
|
-
],
|
|
1160
|
-
"returns": "Promise<PluginListenerHandle>",
|
|
1161
|
-
"tags": [
|
|
1162
|
-
{
|
|
1163
|
-
"name": "deprecated",
|
|
1164
|
-
"text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
|
|
1165
|
-
},
|
|
1166
|
-
{
|
|
1167
|
-
"name": "since",
|
|
1168
|
-
"text": "4.0.0"
|
|
1169
|
-
}
|
|
1170
|
-
],
|
|
1171
|
-
"docs": "Listen for no need to update event, useful when you want force check every time the app is launched",
|
|
1172
|
-
"complexTypes": [
|
|
1173
|
-
"PluginListenerHandle",
|
|
1174
|
-
"NoNeedEvent"
|
|
1175
|
-
],
|
|
1176
|
-
"slug": "addlistenernoneedupdate-"
|
|
1177
|
-
},
|
|
1178
|
-
{
|
|
1179
|
-
"name": "addListener",
|
|
1180
|
-
"signature": "(eventName: 'updateCheckResult', listenerFunc: (state: UpdateCheckResultEvent) => void) => Promise<PluginListenerHandle>",
|
|
1181
|
-
"parameters": [
|
|
1182
|
-
{
|
|
1183
|
-
"name": "eventName",
|
|
1184
|
-
"docs": "",
|
|
1185
|
-
"type": "'updateCheckResult'"
|
|
1186
|
-
},
|
|
1187
|
-
{
|
|
1188
|
-
"name": "listenerFunc",
|
|
1189
|
-
"docs": "",
|
|
1190
|
-
"type": "(state: UpdateCheckResultEvent) => void"
|
|
1191
|
-
}
|
|
1192
|
-
],
|
|
1193
|
-
"returns": "Promise<PluginListenerHandle>",
|
|
1194
|
-
"tags": [
|
|
1195
|
-
{
|
|
1196
|
-
"name": "deprecated",
|
|
1197
|
-
"text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
|
|
1198
|
-
},
|
|
1199
|
-
{
|
|
1200
|
-
"name": "since",
|
|
1201
|
-
"text": "8.45.11"
|
|
1202
|
-
}
|
|
1203
|
-
],
|
|
1204
|
-
"docs": "Listen for update check results before the updater decides whether to download.\nThe backend can classify the UpdateCheckResultEvent payload as `up_to_date`, `blocked`, or `failed`.\n\nThis event is emitted alongside legacy events. For `up_to_date` and `blocked`, it is emitted before\n`noNeedUpdate` and does not emit `downloadFailed`. For `failed`, it is emitted before the legacy\n`downloadFailed` event; native code also sends an `update_check_error` stat (with error metadata)\ninstead of `download_fail`, because no bundle download was attempted.",
|
|
1205
|
-
"complexTypes": [
|
|
1206
|
-
"PluginListenerHandle",
|
|
1207
|
-
"UpdateCheckResultEvent"
|
|
1208
|
-
],
|
|
1209
|
-
"slug": "addlistenerupdatecheckresult-"
|
|
1210
|
-
},
|
|
1211
|
-
{
|
|
1212
|
-
"name": "addListener",
|
|
1213
|
-
"signature": "(eventName: 'updateAvailable', listenerFunc: (state: UpdateAvailableEvent) => void) => Promise<PluginListenerHandle>",
|
|
1214
|
-
"parameters": [
|
|
1215
|
-
{
|
|
1216
|
-
"name": "eventName",
|
|
1217
|
-
"docs": "",
|
|
1218
|
-
"type": "'updateAvailable'"
|
|
1219
|
-
},
|
|
1220
|
-
{
|
|
1221
|
-
"name": "listenerFunc",
|
|
1222
|
-
"docs": "",
|
|
1223
|
-
"type": "(state: UpdateAvailableEvent) => void"
|
|
1224
|
-
}
|
|
1225
|
-
],
|
|
1226
|
-
"returns": "Promise<PluginListenerHandle>",
|
|
1227
|
-
"tags": [
|
|
1228
|
-
{
|
|
1229
|
-
"name": "deprecated",
|
|
1230
|
-
"text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
|
|
1231
|
-
},
|
|
1232
|
-
{
|
|
1233
|
-
"name": "since",
|
|
1234
|
-
"text": "4.0.0"
|
|
1235
|
-
}
|
|
1236
|
-
],
|
|
1237
|
-
"docs": "Listen for available update event, useful when you want to force check every time the app is launched",
|
|
1238
|
-
"complexTypes": [
|
|
1239
|
-
"PluginListenerHandle",
|
|
1240
|
-
"UpdateAvailableEvent"
|
|
1241
|
-
],
|
|
1242
|
-
"slug": "addlistenerupdateavailable-"
|
|
1243
|
-
},
|
|
1244
|
-
{
|
|
1245
|
-
"name": "addListener",
|
|
1246
|
-
"signature": "(eventName: 'downloadComplete', listenerFunc: (state: DownloadCompleteEvent) => void) => Promise<PluginListenerHandle>",
|
|
1247
|
-
"parameters": [
|
|
1248
|
-
{
|
|
1249
|
-
"name": "eventName",
|
|
1250
|
-
"docs": "",
|
|
1251
|
-
"type": "'downloadComplete'"
|
|
1252
|
-
},
|
|
1253
|
-
{
|
|
1254
|
-
"name": "listenerFunc",
|
|
1255
|
-
"docs": "",
|
|
1256
|
-
"type": "(state: DownloadCompleteEvent) => void"
|
|
1257
|
-
}
|
|
1258
|
-
],
|
|
1259
|
-
"returns": "Promise<PluginListenerHandle>",
|
|
1260
|
-
"tags": [
|
|
1261
|
-
{
|
|
1262
|
-
"name": "deprecated",
|
|
1263
|
-
"text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
|
|
1264
|
-
},
|
|
1265
|
-
{
|
|
1266
|
-
"name": "since",
|
|
1267
|
-
"text": "4.0.0"
|
|
1268
|
-
}
|
|
1269
|
-
],
|
|
1270
|
-
"docs": "Listen for downloadComplete events.",
|
|
1271
|
-
"complexTypes": [
|
|
1272
|
-
"PluginListenerHandle",
|
|
1273
|
-
"DownloadCompleteEvent"
|
|
1274
|
-
],
|
|
1275
|
-
"slug": "addlistenerdownloadcomplete-"
|
|
1276
|
-
},
|
|
1277
|
-
{
|
|
1278
|
-
"name": "addListener",
|
|
1279
|
-
"signature": "(eventName: 'breakingAvailable', listenerFunc: (state: BreakingAvailableEvent) => void) => Promise<PluginListenerHandle>",
|
|
1280
|
-
"parameters": [
|
|
1281
|
-
{
|
|
1282
|
-
"name": "eventName",
|
|
1283
|
-
"docs": "",
|
|
1284
|
-
"type": "'breakingAvailable'"
|
|
1285
|
-
},
|
|
1286
|
-
{
|
|
1287
|
-
"name": "listenerFunc",
|
|
1288
|
-
"docs": "",
|
|
1289
|
-
"type": "(state: MajorAvailableEvent) => void"
|
|
1290
|
-
}
|
|
1291
|
-
],
|
|
1292
|
-
"returns": "Promise<PluginListenerHandle>",
|
|
1293
|
-
"tags": [
|
|
1294
|
-
{
|
|
1295
|
-
"name": "deprecated",
|
|
1296
|
-
"text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
|
|
1297
|
-
},
|
|
1298
|
-
{
|
|
1299
|
-
"name": "since",
|
|
1300
|
-
"text": "7.22.0"
|
|
1301
|
-
}
|
|
1302
|
-
],
|
|
1303
|
-
"docs": "Listen for breaking update events when the backend flags an update as incompatible with the current app.\nEmits the same payload as the legacy `majorAvailable` listener.",
|
|
1304
|
-
"complexTypes": [
|
|
1305
|
-
"PluginListenerHandle",
|
|
1306
|
-
"BreakingAvailableEvent"
|
|
1307
|
-
],
|
|
1308
|
-
"slug": "addlistenerbreakingavailable-"
|
|
1309
|
-
},
|
|
1310
|
-
{
|
|
1311
|
-
"name": "addListener",
|
|
1312
|
-
"signature": "(eventName: 'majorAvailable', listenerFunc: (state: MajorAvailableEvent) => void) => Promise<PluginListenerHandle>",
|
|
1313
|
-
"parameters": [
|
|
1314
|
-
{
|
|
1315
|
-
"name": "eventName",
|
|
1316
|
-
"docs": "",
|
|
1317
|
-
"type": "'majorAvailable'"
|
|
1318
|
-
},
|
|
1319
|
-
{
|
|
1320
|
-
"name": "listenerFunc",
|
|
1321
|
-
"docs": "",
|
|
1322
|
-
"type": "(state: MajorAvailableEvent) => void"
|
|
1323
|
-
}
|
|
1324
|
-
],
|
|
1325
|
-
"returns": "Promise<PluginListenerHandle>",
|
|
1326
|
-
"tags": [
|
|
1327
|
-
{
|
|
1328
|
-
"name": "deprecated",
|
|
1329
|
-
"text": "Deprecated alias for {@link addListener} with `breakingAvailable`. Emits the same payload. will be removed in v8"
|
|
1330
|
-
},
|
|
1331
|
-
{
|
|
1332
|
-
"name": "since",
|
|
1333
|
-
"text": "2.3.0"
|
|
1334
|
-
}
|
|
1335
|
-
],
|
|
1336
|
-
"docs": "Listen for Major update event in the App, let you know when major update is blocked by setting disableAutoUpdateBreaking",
|
|
1337
|
-
"complexTypes": [
|
|
1338
|
-
"PluginListenerHandle",
|
|
1339
|
-
"MajorAvailableEvent"
|
|
1340
|
-
],
|
|
1341
|
-
"slug": "addlistenermajoravailable-"
|
|
1342
|
-
},
|
|
1343
|
-
{
|
|
1344
|
-
"name": "addListener",
|
|
1345
|
-
"signature": "(eventName: 'updateFailed', listenerFunc: (state: UpdateFailedEvent) => void) => Promise<PluginListenerHandle>",
|
|
1346
|
-
"parameters": [
|
|
1347
|
-
{
|
|
1348
|
-
"name": "eventName",
|
|
1349
|
-
"docs": "",
|
|
1350
|
-
"type": "'updateFailed'"
|
|
1351
|
-
},
|
|
1352
|
-
{
|
|
1353
|
-
"name": "listenerFunc",
|
|
1354
|
-
"docs": "",
|
|
1355
|
-
"type": "(state: UpdateFailedEvent) => void"
|
|
1356
|
-
}
|
|
1357
|
-
],
|
|
1358
|
-
"returns": "Promise<PluginListenerHandle>",
|
|
1359
|
-
"tags": [
|
|
1360
|
-
{
|
|
1361
|
-
"name": "deprecated",
|
|
1362
|
-
"text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
|
|
1363
|
-
},
|
|
1364
|
-
{
|
|
1365
|
-
"name": "since",
|
|
1366
|
-
"text": "2.3.0"
|
|
1367
|
-
}
|
|
1368
|
-
],
|
|
1369
|
-
"docs": "Listen for update fail event in the App, let you know when update has fail to install at next app start",
|
|
1370
|
-
"complexTypes": [
|
|
1371
|
-
"PluginListenerHandle",
|
|
1372
|
-
"UpdateFailedEvent"
|
|
1373
|
-
],
|
|
1374
|
-
"slug": "addlistenerupdatefailed-"
|
|
1375
|
-
},
|
|
1376
|
-
{
|
|
1377
|
-
"name": "addListener",
|
|
1378
|
-
"signature": "(eventName: 'set', listenerFunc: (state: SetEvent) => void) => Promise<PluginListenerHandle>",
|
|
1379
|
-
"parameters": [
|
|
1380
|
-
{
|
|
1381
|
-
"name": "eventName",
|
|
1382
|
-
"docs": "",
|
|
1383
|
-
"type": "'set'"
|
|
1384
|
-
},
|
|
1385
|
-
{
|
|
1386
|
-
"name": "listenerFunc",
|
|
1387
|
-
"docs": "",
|
|
1388
|
-
"type": "(state: SetEvent) => void"
|
|
1389
|
-
}
|
|
1390
|
-
],
|
|
1391
|
-
"returns": "Promise<PluginListenerHandle>",
|
|
1392
|
-
"tags": [
|
|
1393
|
-
{
|
|
1394
|
-
"name": "deprecated",
|
|
1395
|
-
"text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
|
|
1396
|
-
},
|
|
1397
|
-
{
|
|
1398
|
-
"name": "since",
|
|
1399
|
-
"text": "8.43.12"
|
|
1400
|
-
}
|
|
1401
|
-
],
|
|
1402
|
-
"docs": "Listen for set event in the App, let you know when a bundle has been applied successfully.\nThis event is retained natively until JavaScript consumes it, so if the app reloads before your\nlistener is attached, the last pending `set` event is delivered once the listener subscribes.",
|
|
1403
|
-
"complexTypes": [
|
|
1404
|
-
"PluginListenerHandle",
|
|
1405
|
-
"SetEvent"
|
|
1406
|
-
],
|
|
1407
|
-
"slug": "addlistenerset-"
|
|
1408
|
-
},
|
|
1409
|
-
{
|
|
1410
|
-
"name": "addListener",
|
|
1411
|
-
"signature": "(eventName: 'setNext', listenerFunc: (state: SetNextEvent) => void) => Promise<PluginListenerHandle>",
|
|
1412
|
-
"parameters": [
|
|
1413
|
-
{
|
|
1414
|
-
"name": "eventName",
|
|
1415
|
-
"docs": "",
|
|
1416
|
-
"type": "'setNext'"
|
|
1417
|
-
},
|
|
1418
|
-
{
|
|
1419
|
-
"name": "listenerFunc",
|
|
1420
|
-
"docs": "",
|
|
1421
|
-
"type": "(state: SetNextEvent) => void"
|
|
1422
|
-
}
|
|
1423
|
-
],
|
|
1424
|
-
"returns": "Promise<PluginListenerHandle>",
|
|
1425
|
-
"tags": [
|
|
1426
|
-
{
|
|
1427
|
-
"name": "deprecated",
|
|
1428
|
-
"text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
|
|
1429
|
-
},
|
|
1430
|
-
{
|
|
1431
|
-
"name": "since",
|
|
1432
|
-
"text": "6.14.0"
|
|
1433
|
-
}
|
|
1434
|
-
],
|
|
1435
|
-
"docs": "Listen for set next event in the App, let you know when a bundle is queued as the next bundle to install.",
|
|
1436
|
-
"complexTypes": [
|
|
1437
|
-
"PluginListenerHandle",
|
|
1438
|
-
"SetNextEvent"
|
|
1439
|
-
],
|
|
1440
|
-
"slug": "addlistenersetnext-"
|
|
1441
|
-
},
|
|
1442
|
-
{
|
|
1443
|
-
"name": "addListener",
|
|
1444
|
-
"signature": "(eventName: 'downloadFailed', listenerFunc: (state: DownloadFailedEvent) => void) => Promise<PluginListenerHandle>",
|
|
1445
|
-
"parameters": [
|
|
1446
|
-
{
|
|
1447
|
-
"name": "eventName",
|
|
1448
|
-
"docs": "",
|
|
1449
|
-
"type": "'downloadFailed'"
|
|
1450
|
-
},
|
|
1451
|
-
{
|
|
1452
|
-
"name": "listenerFunc",
|
|
1453
|
-
"docs": "",
|
|
1454
|
-
"type": "(state: DownloadFailedEvent) => void"
|
|
1455
|
-
}
|
|
1456
|
-
],
|
|
1457
|
-
"returns": "Promise<PluginListenerHandle>",
|
|
1458
|
-
"tags": [
|
|
1459
|
-
{
|
|
1460
|
-
"name": "deprecated",
|
|
1461
|
-
"text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
|
|
1462
|
-
},
|
|
1463
|
-
{
|
|
1464
|
-
"name": "since",
|
|
1465
|
-
"text": "4.0.0"
|
|
1466
|
-
}
|
|
1467
|
-
],
|
|
1468
|
-
"docs": "Listen for download fail event in the App, let you know when a bundle download has failed",
|
|
1469
|
-
"complexTypes": [
|
|
1470
|
-
"PluginListenerHandle",
|
|
1471
|
-
"DownloadFailedEvent"
|
|
1472
|
-
],
|
|
1473
|
-
"slug": "addlistenerdownloadfailed-"
|
|
1474
|
-
},
|
|
1475
|
-
{
|
|
1476
|
-
"name": "addListener",
|
|
1477
|
-
"signature": "(eventName: 'appReloaded', listenerFunc: () => void) => Promise<PluginListenerHandle>",
|
|
1478
|
-
"parameters": [
|
|
1479
|
-
{
|
|
1480
|
-
"name": "eventName",
|
|
1481
|
-
"docs": "",
|
|
1482
|
-
"type": "'appReloaded'"
|
|
1483
|
-
},
|
|
1484
|
-
{
|
|
1485
|
-
"name": "listenerFunc",
|
|
1486
|
-
"docs": "",
|
|
1487
|
-
"type": "() => void"
|
|
1488
|
-
}
|
|
1489
|
-
],
|
|
1490
|
-
"returns": "Promise<PluginListenerHandle>",
|
|
1491
|
-
"tags": [
|
|
1492
|
-
{
|
|
1493
|
-
"name": "deprecated",
|
|
1494
|
-
"text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
|
|
1495
|
-
},
|
|
1496
|
-
{
|
|
1497
|
-
"name": "since",
|
|
1498
|
-
"text": "4.3.0"
|
|
1499
|
-
}
|
|
1500
|
-
],
|
|
1501
|
-
"docs": "Listen for reload event in the App, let you know when reload has happened",
|
|
1502
|
-
"complexTypes": [
|
|
1503
|
-
"PluginListenerHandle"
|
|
1504
|
-
],
|
|
1505
|
-
"slug": "addlistenerappreloaded-"
|
|
1506
|
-
},
|
|
1507
|
-
{
|
|
1508
|
-
"name": "addListener",
|
|
1509
|
-
"signature": "(eventName: 'appReady', listenerFunc: (state: AppReadyEvent) => void) => Promise<PluginListenerHandle>",
|
|
1510
|
-
"parameters": [
|
|
1511
|
-
{
|
|
1512
|
-
"name": "eventName",
|
|
1513
|
-
"docs": "",
|
|
1514
|
-
"type": "'appReady'"
|
|
1515
|
-
},
|
|
1516
|
-
{
|
|
1517
|
-
"name": "listenerFunc",
|
|
1518
|
-
"docs": "",
|
|
1519
|
-
"type": "(state: AppReadyEvent) => void"
|
|
1520
|
-
}
|
|
1521
|
-
],
|
|
1522
|
-
"returns": "Promise<PluginListenerHandle>",
|
|
1523
|
-
"tags": [
|
|
1524
|
-
{
|
|
1525
|
-
"name": "deprecated",
|
|
1526
|
-
"text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
|
|
1527
|
-
},
|
|
1528
|
-
{
|
|
1529
|
-
"name": "since",
|
|
1530
|
-
"text": "5.1.0"
|
|
1531
|
-
}
|
|
1532
|
-
],
|
|
1533
|
-
"docs": "Listen for app ready event in the App, let you know when app is ready to use.\nThis event is retained natively until JavaScript consumes it, so it can still be delivered after\na reload even if the listener is attached later in app startup.",
|
|
1534
|
-
"complexTypes": [
|
|
1535
|
-
"PluginListenerHandle",
|
|
1536
|
-
"AppReadyEvent"
|
|
1537
|
-
],
|
|
1538
|
-
"slug": "addlistenerappready-"
|
|
1539
|
-
},
|
|
1540
|
-
{
|
|
1541
|
-
"name": "addListener",
|
|
1542
|
-
"signature": "(eventName: 'channelPrivate', listenerFunc: (state: ChannelPrivateEvent) => void) => Promise<PluginListenerHandle>",
|
|
1543
|
-
"parameters": [
|
|
1544
|
-
{
|
|
1545
|
-
"name": "eventName",
|
|
1546
|
-
"docs": "",
|
|
1547
|
-
"type": "'channelPrivate'"
|
|
1548
|
-
},
|
|
1549
|
-
{
|
|
1550
|
-
"name": "listenerFunc",
|
|
1551
|
-
"docs": "",
|
|
1552
|
-
"type": "(state: ChannelPrivateEvent) => void"
|
|
1553
|
-
}
|
|
1554
|
-
],
|
|
1555
|
-
"returns": "Promise<PluginListenerHandle>",
|
|
1556
|
-
"tags": [
|
|
1557
|
-
{
|
|
1558
|
-
"name": "deprecated",
|
|
1559
|
-
"text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
|
|
1560
|
-
},
|
|
1561
|
-
{
|
|
1562
|
-
"name": "since",
|
|
1563
|
-
"text": "7.34.0"
|
|
1564
|
-
}
|
|
1565
|
-
],
|
|
1566
|
-
"docs": "Listen for channel private event, fired when attempting to set a channel that doesn't allow device self-assignment.\n\nThis event is useful for:\n- Informing users they don't have permission to switch to a specific channel\n- Implementing custom error handling for channel restrictions\n- Logging unauthorized channel access attempts",
|
|
1567
|
-
"complexTypes": [
|
|
1568
|
-
"PluginListenerHandle",
|
|
1569
|
-
"ChannelPrivateEvent"
|
|
1570
|
-
],
|
|
1571
|
-
"slug": "addlistenerchannelprivate-"
|
|
1572
|
-
},
|
|
1573
|
-
{
|
|
1574
|
-
"name": "addListener",
|
|
1575
|
-
"signature": "(eventName: 'onFlexibleUpdateStateChange', listenerFunc: (state: FlexibleUpdateState) => void) => Promise<PluginListenerHandle>",
|
|
1576
|
-
"parameters": [
|
|
1577
|
-
{
|
|
1578
|
-
"name": "eventName",
|
|
1579
|
-
"docs": "",
|
|
1580
|
-
"type": "'onFlexibleUpdateStateChange'"
|
|
1581
|
-
},
|
|
1582
|
-
{
|
|
1583
|
-
"name": "listenerFunc",
|
|
1584
|
-
"docs": "",
|
|
1585
|
-
"type": "(state: FlexibleUpdateState) => void"
|
|
1586
|
-
}
|
|
1587
|
-
],
|
|
1588
|
-
"returns": "Promise<PluginListenerHandle>",
|
|
1589
|
-
"tags": [
|
|
1590
|
-
{
|
|
1591
|
-
"name": "deprecated",
|
|
1592
|
-
"text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
|
|
1593
|
-
},
|
|
1594
|
-
{
|
|
1595
|
-
"name": "since",
|
|
1596
|
-
"text": "8.0.0"
|
|
1597
|
-
}
|
|
1598
|
-
],
|
|
1599
|
-
"docs": "Listen for flexible update state changes on Android.\n\nThis event fires during the flexible update download process, providing:\n- Download progress (bytes downloaded / total bytes)\n- Installation status changes\n\n**Install status values:**\n- `UNKNOWN` (0): Unknown status\n- `PENDING` (1): Download pending\n- `DOWNLOADING` (2): Download in progress\n- `INSTALLING` (3): Installing the update\n- `INSTALLED` (4): Update installed (app restart needed)\n- `FAILED` (5): Update failed\n- `CANCELED` (6): Update was canceled\n- `DOWNLOADED` (11): Download complete, ready to install\n\nWhen status is `DOWNLOADED`, you should prompt the user and call\n{@link completeFlexibleUpdate} to finish the installation.",
|
|
1600
|
-
"complexTypes": [
|
|
1601
|
-
"PluginListenerHandle",
|
|
1602
|
-
"FlexibleUpdateState"
|
|
1603
|
-
],
|
|
1604
|
-
"slug": "addlisteneronflexibleupdatestatechange-"
|
|
1605
|
-
},
|
|
1606
1112
|
{
|
|
1607
1113
|
"name": "isAutoUpdateAvailable",
|
|
1608
1114
|
"signature": "() => Promise<AutoUpdateAvailable>",
|
|
@@ -1981,7 +1487,7 @@
|
|
|
1981
1487
|
"text": "8.0.0"
|
|
1982
1488
|
}
|
|
1983
1489
|
],
|
|
1984
|
-
"docs": "Start a flexible in-app update on Android.\n\nThis triggers Google Play's flexible update flow, which:\n1. Downloads the update in the background\n2. Allows the user to continue using the app\n3. Notifies when download is complete\n4. Requires calling {@link completeFlexibleUpdate} to install\n\nMonitor the download progress
|
|
1490
|
+
"docs": "Start a flexible in-app update on Android.\n\nThis triggers Google Play's flexible update flow, which:\n1. Downloads the update in the background\n2. Allows the user to continue using the app\n3. Notifies when download is complete\n4. Requires calling {@link completeFlexibleUpdate} to install\n\nMonitor the download progress with the `onFlexibleUpdateStateChange` type of `updaterEvent`.\n\n**Requirements:**\n- Android only (throws error on iOS)\n- An update must be available (check with {@link getAppUpdateInfo} first)\n- The update must allow flexible updates (`flexibleUpdateAllowed: true`)\n\n**Typical flow:**\n1. Call `startFlexibleUpdate()` to begin download\n2. Listen to `updaterEvent` and handle `onFlexibleUpdateStateChange` for progress\n3. When status is `DOWNLOADED`, prompt user to restart\n4. Call `completeFlexibleUpdate()` to install and restart",
|
|
1985
1491
|
"complexTypes": [
|
|
1986
1492
|
"AppUpdateResult"
|
|
1987
1493
|
],
|
|
@@ -2175,7 +1681,7 @@
|
|
|
2175
1681
|
"name": "default"
|
|
2176
1682
|
}
|
|
2177
1683
|
],
|
|
2178
|
-
"docs": "The checksum for the update, it should be in sha256 and encrypted with private key if the bundle is encrypted",
|
|
1684
|
+
"docs": "The checksum for the update, it should be in sha256 and encrypted with private key if the bundle is encrypted.\n\nSince 9.0.0, the checksum of an encrypted bundle must sign both the SHA-256 of the bundle zip and the\nSHA-256 of the encrypted bytes (the format `npx @capgo/cli@latest bundle encrypt` produces for updater 9).\nThe plugin checks the downloaded bytes against it before decrypting them.",
|
|
2179
1685
|
"complexTypes": [],
|
|
2180
1686
|
"type": "string | undefined"
|
|
2181
1687
|
},
|
|
@@ -2866,18 +2372,6 @@
|
|
|
2866
2372
|
"complexTypes": [],
|
|
2867
2373
|
"type": "boolean | undefined"
|
|
2868
2374
|
},
|
|
2869
|
-
{
|
|
2870
|
-
"name": "major",
|
|
2871
|
-
"tags": [
|
|
2872
|
-
{
|
|
2873
|
-
"text": "Use {@link LatestVersion.breaking} instead.",
|
|
2874
|
-
"name": "deprecated"
|
|
2875
|
-
}
|
|
2876
|
-
],
|
|
2877
|
-
"docs": "",
|
|
2878
|
-
"complexTypes": [],
|
|
2879
|
-
"type": "boolean | undefined"
|
|
2880
|
-
},
|
|
2881
2375
|
{
|
|
2882
2376
|
"name": "message",
|
|
2883
2377
|
"tags": [],
|
|
@@ -3838,25 +3332,26 @@
|
|
|
3838
3332
|
]
|
|
3839
3333
|
},
|
|
3840
3334
|
{
|
|
3841
|
-
"name": "
|
|
3842
|
-
"slug": "
|
|
3843
|
-
"docs": "",
|
|
3844
|
-
"tags": [
|
|
3335
|
+
"name": "BreakingAvailableEvent",
|
|
3336
|
+
"slug": "breakingavailableevent",
|
|
3337
|
+
"docs": "Payload of the `breakingAvailable` {@link UpdaterEvent}.",
|
|
3338
|
+
"tags": [
|
|
3339
|
+
{
|
|
3340
|
+
"text": "7.22.0",
|
|
3341
|
+
"name": "since"
|
|
3342
|
+
}
|
|
3343
|
+
],
|
|
3845
3344
|
"methods": [],
|
|
3846
3345
|
"properties": [
|
|
3847
3346
|
{
|
|
3848
3347
|
"name": "version",
|
|
3849
3348
|
"tags": [
|
|
3850
3349
|
{
|
|
3851
|
-
"text": "
|
|
3852
|
-
"name": "deprecated"
|
|
3853
|
-
},
|
|
3854
|
-
{
|
|
3855
|
-
"text": "4.0.0",
|
|
3350
|
+
"text": "7.22.0",
|
|
3856
3351
|
"name": "since"
|
|
3857
3352
|
}
|
|
3858
3353
|
],
|
|
3859
|
-
"docs": "
|
|
3354
|
+
"docs": "Version of the breaking update that the backend blocked for this native app.",
|
|
3860
3355
|
"complexTypes": [],
|
|
3861
3356
|
"type": "string"
|
|
3862
3357
|
}
|
|
@@ -4642,7 +4137,7 @@
|
|
|
4642
4137
|
{
|
|
4643
4138
|
"name": "UpdaterEvent",
|
|
4644
4139
|
"slug": "updaterevent",
|
|
4645
|
-
"docs": "Payload of the single `updaterEvent` listener: every plugin event as `{ type, data }`.\
|
|
4140
|
+
"docs": "Payload of the single `updaterEvent` listener: every plugin event as `{ type, data }`.\nSwitch on `type` to get a typed `data`.\n\n- `download`: download progress of a bundle, from start to finish (`percent` between 0 and 100).\n- `noNeedUpdate`: the update check found nothing to install.\n- `updateCheckResult`: classified result of an update check, before the updater decides whether to download.\n In the background update pipeline, `up_to_date` and `blocked` are emitted before `noNeedUpdate` and no\n `downloadFailed` follows. A `failed` result is emitted before `downloadFailed`, and native code sends an\n `update_check_error` stat instead of `download_fail` because no bundle download was attempted.\n Periodic checks (`periodCheckDelay`) may emit only `updateCheckResult`, without those follow-up events or stats.\n- `updateAvailable`: a new bundle is downloaded and ready.\n- `downloadComplete`: a bundle download finished.\n- `downloadFailed`: a bundle download or update check failed.\n- `breakingAvailable`: the backend blocked an update as incompatible with the current native app.\n- `updateFailed`: a bundle failed to install at the next app start and was rolled back.\n- `set`: a bundle was applied. Retained natively until a listener consumes it.\n- `setNext`: a bundle was queued as the next bundle to install.\n- `appReloaded`: the app reloaded.\n- `appReady`: the app is ready to use. Retained natively until a listener consumes it.\n- `channelPrivate`: `setChannel()` targeted a channel that does not allow device self-assignment.\n- `onFlexibleUpdateStateChange`: Android flexible in-app update progress and install status.\n When `installStatus` is `DOWNLOADED`, prompt the user and call\n {@link CapacitorUpdaterPlugin.completeFlexibleUpdate}.",
|
|
4646
4141
|
"types": [
|
|
4647
4142
|
{
|
|
4648
4143
|
"text": "{ type: 'download'; data: DownloadEvent }",
|
|
@@ -4730,19 +4225,6 @@
|
|
|
4730
4225
|
}
|
|
4731
4226
|
]
|
|
4732
4227
|
},
|
|
4733
|
-
{
|
|
4734
|
-
"name": "BreakingAvailableEvent",
|
|
4735
|
-
"slug": "breakingavailableevent",
|
|
4736
|
-
"docs": "Payload emitted by {@link CapacitorUpdaterPlugin.addListener} with `breakingAvailable`.",
|
|
4737
|
-
"types": [
|
|
4738
|
-
{
|
|
4739
|
-
"text": "MajorAvailableEvent",
|
|
4740
|
-
"complexTypes": [
|
|
4741
|
-
"MajorAvailableEvent"
|
|
4742
|
-
]
|
|
4743
|
-
}
|
|
4744
|
-
]
|
|
4745
|
-
},
|
|
4746
4228
|
{
|
|
4747
4229
|
"name": "Record",
|
|
4748
4230
|
"slug": "record",
|
|
@@ -4954,26 +4436,6 @@
|
|
|
4954
4436
|
"complexTypes": [],
|
|
4955
4437
|
"type": "string | undefined"
|
|
4956
4438
|
},
|
|
4957
|
-
{
|
|
4958
|
-
"name": "directUpdate",
|
|
4959
|
-
"tags": [
|
|
4960
|
-
{
|
|
4961
|
-
"text": "Use {@link PluginsConfig.CapacitorUpdater.autoUpdate} string modes instead.\n\nOnly available for Android and iOS.",
|
|
4962
|
-
"name": "deprecated"
|
|
4963
|
-
},
|
|
4964
|
-
{
|
|
4965
|
-
"text": "false",
|
|
4966
|
-
"name": "default"
|
|
4967
|
-
},
|
|
4968
|
-
{
|
|
4969
|
-
"text": "5.1.0",
|
|
4970
|
-
"name": "since"
|
|
4971
|
-
}
|
|
4972
|
-
],
|
|
4973
|
-
"docs": "Configure when the plugin should direct install updates. Only for autoUpdate mode.\nInstant 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.\nThese modes require `autoSplashscreen: true` and `@capacitor/splash-screen` installed with `launchAutoHide: false`.\nThis flag makes the CLI upload delta in CI and ask for confirmation in local uploads.\n- false: Never do direct updates\n- atInstall: Same as `\"atInstall\"` for {@link autoUpdate}\n- onLaunch: Same as `\"onLaunch\"` for {@link autoUpdate}\n- always: Same as `\"always\"` for {@link autoUpdate}\n- true: (deprecated) Same as \"always\" for backward compatibility",
|
|
4974
|
-
"complexTypes": [],
|
|
4975
|
-
"type": "boolean | 'always' | 'atInstall' | 'onLaunch' | undefined"
|
|
4976
|
-
},
|
|
4977
4439
|
{
|
|
4978
4440
|
"name": "autoSplashscreen",
|
|
4979
4441
|
"tags": [
|
|
@@ -4986,7 +4448,7 @@
|
|
|
4986
4448
|
"name": "since"
|
|
4987
4449
|
}
|
|
4988
4450
|
],
|
|
4989
|
-
"docs": "Automatically hide the splashscreen after instant apply updates finish, or when no update is needed.\nRequired when using instant apply modes (`\"atInstall\"`, `\"onLaunch\"`, `\"always\"`)
|
|
4451
|
+
"docs": "Automatically hide the splashscreen after instant apply updates finish, or when no update is needed.\nRequired when using the instant apply {@link autoUpdate} modes (`\"atInstall\"`, `\"onLaunch\"`, `\"always\"`).\n`@capacitor/splash-screen` must be installed and configured with `launchAutoHide: false`.\nThis removes the need to manually listen for appReady events and call SplashScreen.hide().\n\nOnly available for Android and iOS.",
|
|
4990
4452
|
"complexTypes": [],
|
|
4991
4453
|
"type": "boolean | undefined"
|
|
4992
4454
|
},
|
|
@@ -5018,7 +4480,7 @@
|
|
|
5018
4480
|
"name": "since"
|
|
5019
4481
|
}
|
|
5020
4482
|
],
|
|
5021
|
-
"docs": "Automatically hide the splashscreen after the specified number of milliseconds when using automatic direct updates.\nIf the timeout elapses, the update continues to download in the background while the splashscreen is dismissed.\nSet to `0` (zero) to disable the timeout.\
|
|
4483
|
+
"docs": "Automatically hide the splashscreen after the specified number of milliseconds when using automatic direct updates.\nIf the timeout elapses, the update continues to download in the background while the splashscreen is dismissed.\nSet to `0` (zero) to disable the timeout.\nIf installation has not started when the timeout fires, the downloaded bundle is installed on the next background/launch.\nIf installation has already started, the splashscreen still hides at the deadline while the reload and app-ready checks finish.\nThis can briefly expose the previous page while the new bundle loads.\nRequires {@link autoSplashscreen} to be enabled.\n\nOnly available for Android and iOS.",
|
|
5022
4484
|
"complexTypes": [],
|
|
5023
4485
|
"type": "number | undefined"
|
|
5024
4486
|
},
|
|
@@ -5202,11 +4664,27 @@
|
|
|
5202
4664
|
"complexTypes": [],
|
|
5203
4665
|
"type": "boolean | undefined"
|
|
5204
4666
|
},
|
|
4667
|
+
{
|
|
4668
|
+
"name": "http3",
|
|
4669
|
+
"tags": [
|
|
4670
|
+
{
|
|
4671
|
+
"text": "true",
|
|
4672
|
+
"name": "default"
|
|
4673
|
+
},
|
|
4674
|
+
{
|
|
4675
|
+
"text": "8.55.0",
|
|
4676
|
+
"name": "since"
|
|
4677
|
+
}
|
|
4678
|
+
],
|
|
4679
|
+
"docs": "Let bundle and manifest downloads use HTTP/3 when the server advertises it.\n\nAndroid 14+ (and Android 12 or 13 with the S extension at level 7) sends https downloads through the\nplatform `HttpEngine`, which keeps the server's HTTP/3 support across app launches and falls back to\nHTTP/2 (or HTTP/1.1 when the server lacks HTTP/2) on its own when QUIC is blocked. Older Android versions\nkeep the current OkHttp client (HTTP/2 or HTTP/1.1). iOS marks download requests as HTTP/3 capable, and\nURLSession falls back to HTTP/2 or HTTP/1.1 when QUIC fails or the server does not support HTTP/3.\nUpdate checks, stats and channel calls are not affected.\n\nSet to `false` to stop preferring HTTP/3. Android then keeps downloads on the previous OkHttp client\n(HTTP/2 or HTTP/1.1). iOS no longer marks downloads as HTTP/3 capable, but URLSession can still pick\nHTTP/3 on its own if it already learned the server supports it, so `false` is not a hard HTTP/2 guarantee there.\n\nOnly available for Android and iOS.",
|
|
4680
|
+
"complexTypes": [],
|
|
4681
|
+
"type": "boolean | undefined"
|
|
4682
|
+
},
|
|
5205
4683
|
{
|
|
5206
4684
|
"name": "builtinMinimum",
|
|
5207
4685
|
"tags": [
|
|
5208
4686
|
{
|
|
5209
|
-
"text": "false",
|
|
4687
|
+
"text": "true (was `false` before 9.0.0)",
|
|
5210
4688
|
"name": "default"
|
|
5211
4689
|
},
|
|
5212
4690
|
{
|
|
@@ -5214,7 +4692,7 @@
|
|
|
5214
4692
|
"name": "since"
|
|
5215
4693
|
}
|
|
5216
4694
|
],
|
|
5217
|
-
"docs": "Refuse to download or install a bundle whose version is lower than the native app version\n(`version` config override, else `CFBundleShortVersionString` / `versionName`). This is the on-device\ncounterpart of the Capgo channel setting \"disable auto update under native\" and protects against a\nreplayed old update response rolling the app back below its store version. Only the numeric\n`major.minor.patch` part is compared (a `1.2.3-beta.1` bundle is accepted on native `1.2.3`), and\nversions that do not parse as semver skip the check. Rejections are reported as the\n`version_below_native` stat.
|
|
4695
|
+
"docs": "Refuse to download or install a bundle whose version is lower than the native app version\n(`version` config override, else `CFBundleShortVersionString` / `versionName`). This is the on-device\ncounterpart of the Capgo channel setting \"disable auto update under native\" and protects against a\nreplayed old update response rolling the app back below its store version. Only the numeric\n`major.minor.patch` part is compared (a `1.2.3-beta.1` bundle is accepted on native `1.2.3`), and\nversions that do not parse as semver skip the check. Rejections are reported as the\n`version_below_native` stat. Set it to `false` if you version web bundles independently of the native\napp (for example native `2.0.0` with bundle `1.4.7`).\n\nOnly available for Android and iOS.",
|
|
5218
4696
|
"complexTypes": [],
|
|
5219
4697
|
"type": "boolean | undefined"
|
|
5220
4698
|
},
|
|
@@ -5270,7 +4748,7 @@
|
|
|
5270
4748
|
"name": "persistCustomId",
|
|
5271
4749
|
"tags": [
|
|
5272
4750
|
{
|
|
5273
|
-
"text": "
|
|
4751
|
+
"text": "true (was `false` before 9.0.0)",
|
|
5274
4752
|
"name": "default"
|
|
5275
4753
|
},
|
|
5276
4754
|
{
|
|
@@ -5278,7 +4756,7 @@
|
|
|
5278
4756
|
"name": "since"
|
|
5279
4757
|
}
|
|
5280
4758
|
],
|
|
5281
|
-
"docs": "Persist the customId set through {@link CapacitorUpdaterPlugin.setCustomId} across app restarts.\n\nOnly available for Android and iOS.",
|
|
4759
|
+
"docs": "Persist the customId set through {@link CapacitorUpdaterPlugin.setCustomId} across app restarts.\nSet it to `false` to keep the customId in memory only, so it resets on every app launch.\nCalling `setCustomId({ customId: '' })` clears the saved value even when persistence is disabled.\n\nOnly available for Android and iOS.",
|
|
5282
4760
|
"complexTypes": [],
|
|
5283
4761
|
"type": "boolean | undefined"
|
|
5284
4762
|
},
|
|
@@ -5472,7 +4950,7 @@
|
|
|
5472
4950
|
"name": "since"
|
|
5473
4951
|
}
|
|
5474
4952
|
],
|
|
5475
|
-
"docs": "When enabled, show a native dialog prompting the user to install a newer native app from the App Store or Play Store.\nThe prompt appears when a live update is blocked because the device native app is too old, including backend\n`disable_auto_update_*` responses, `store_update_required`, and `breakingAvailable`
|
|
4953
|
+
"docs": "When enabled, show a native dialog prompting the user to install a newer native app from the App Store or Play Store.\nThe prompt appears when a live update is blocked because the device native app is too old, including backend\n`disable_auto_update_*` responses, `store_update_required`, and `breakingAvailable` flows.\n\nOnly available for Android and iOS. No-op on web.",
|
|
5476
4954
|
"complexTypes": [],
|
|
5477
4955
|
"type": "boolean | undefined"
|
|
5478
4956
|
},
|