@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.
Files changed (29) hide show
  1. package/CapgoCapacitorUpdater.podspec +0 -3
  2. package/Package.swift +3 -11
  3. package/README.md +201 -66
  4. package/android/build.gradle +2 -3
  5. package/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdaterPlugin.java +593 -176
  6. package/android/src/main/java/ee/forgr/capacitor_updater/CapgoUpdater.java +775 -162
  7. package/android/src/main/java/ee/forgr/capacitor_updater/CryptoCipher.java +2 -1
  8. package/android/src/main/java/ee/forgr/capacitor_updater/DelayUpdateUtils.java +226 -106
  9. package/android/src/main/java/ee/forgr/capacitor_updater/DownloadService.java +107 -30
  10. package/android/src/main/java/ee/forgr/capacitor_updater/HeadlessUpdateWorker.java +325 -0
  11. package/android/src/main/java/ee/forgr/capacitor_updater/Logger.java +63 -4
  12. package/android/src/main/java/ee/forgr/capacitor_updater/NativeUpdatePrompt.java +303 -0
  13. package/android/src/main/java/ee/forgr/capacitor_updater/Version.java +306 -0
  14. package/dist/docs.json +394 -27
  15. package/dist/esm/definitions.d.ts +220 -7
  16. package/dist/esm/definitions.js.map +1 -1
  17. package/ios/Sources/CapacitorUpdaterPlugin/AES.swift +104 -52
  18. package/ios/Sources/CapacitorUpdaterPlugin/CapacitorUpdaterPlugin.swift +472 -144
  19. package/ios/Sources/CapacitorUpdaterPlugin/CapgoSemanticVersion.swift +162 -0
  20. package/ios/Sources/CapacitorUpdaterPlugin/CapgoUpdater.swift +392 -82
  21. package/ios/Sources/CapacitorUpdaterPlugin/CryptoCipher.swift +2 -1
  22. package/ios/Sources/CapacitorUpdaterPlugin/DelayUpdateUtils.swift +204 -93
  23. package/ios/Sources/CapacitorUpdaterPlugin/Logger.swift +75 -5
  24. package/ios/Sources/CapacitorUpdaterPlugin/NativeUpdatePrompt.swift +183 -0
  25. package/ios/Sources/CapacitorUpdaterPlugin/RedirectPolicyDelegate.swift +53 -0
  26. package/ios/Sources/CapacitorUpdaterPlugin/ShakeMenu.swift +5 -2
  27. package/ios/Sources/CapacitorUpdaterPlugin/ZipArchiveReader.swift +247 -0
  28. package/ios/Sources/CapacitorUpdaterPlugin/ZipCentralDirectory.swift +280 -0
  29. package/package.json +7 -3
package/dist/docs.json CHANGED
@@ -636,7 +636,7 @@
636
636
  "tags": [
637
637
  {
638
638
  "name": "example",
639
- "text": "// Update after user kills app OR after 5 minutes in background\nawait CapacitorUpdater.setMultiDelay({\n delayConditions: [\n { kind: 'kill' },\n { kind: 'background', value: '300000' }\n ]\n});"
639
+ "text": "// Update after kill condition clears on launch AND background time exceeds 5 minutes\nawait CapacitorUpdater.setMultiDelay({\n conditionMode: 'or',\n delayConditions: [\n { kind: 'kill' },\n { kind: 'background', value: '300000' }\n ]\n});"
640
640
  },
641
641
  {
642
642
  "name": "example",
@@ -644,7 +644,7 @@
644
644
  },
645
645
  {
646
646
  "name": "example",
647
- "text": "// Default behavior: update on next background\nawait CapacitorUpdater.setMultiDelay({\n delayConditions: [{ kind: 'background' }]\n});"
647
+ "text": "// One background-and-return clears the condition; update installs on the next background\nawait CapacitorUpdater.setMultiDelay({\n delayConditions: [{ kind: 'background' }]\n});"
648
648
  },
649
649
  {
650
650
  "name": "param",
@@ -663,7 +663,7 @@
663
663
  "text": "4.3.0"
664
664
  }
665
665
  ],
666
- "docs": "Configure conditions that must be met before a pending update is applied.\n\nAfter calling {@link next} to queue an update, use this method to control when it gets applied.\nThe update will only be installed after ALL specified conditions are satisfied.\n\nAvailable condition types:\n- `background`: Wait for the app to be backgrounded. Optionally specify duration in milliseconds.\n- `kill`: Wait for the app to be killed and relaunched (**Note:** Current behavior triggers update immediately on kill, not on next background. This will be fixed in v8.)\n- `date`: Wait until a specific date/time (ISO 8601 format)\n- `nativeVersion`: Wait until the native app is updated to a specific version\n\nCondition value formats:\n- `background`: Number in milliseconds (e.g., `\"300000\"` for 5 minutes), or omit for immediate\n- `kill`: No value needed\n- `date`: ISO 8601 date string (e.g., `\"2025-12-31T23:59:59Z\"`)\n- `nativeVersion`: Version string (e.g., `\"2.0.0\"`)",
666
+ "docs": "Configure conditions that must be met before a pending update is applied.\n\nAfter calling {@link next} to queue an update, use this method to control when it gets applied.\nBy default, the update is installed only after **all** specified conditions are satisfied (`conditionMode: 'and'`).\nSet `conditionMode` to `'or'` to apply the update as soon as **any** condition is met.\n\nAvailable condition types:\n- `background`: Wait until the app has spent more than the configured time in the background (see value formats below).\n- `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.\n- `date`: Wait until a specific date/time (ISO 8601 format)\n- `nativeVersion`: Wait until the native app is updated to a specific version\n\nCondition value formats:\n- `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.\n- `kill`: No value needed\n- `date`: ISO 8601 date string (e.g., `\"2025-12-31T23:59:59Z\"`)\n- `nativeVersion`: Version string (e.g., `\"2.0.0\"`)",
667
667
  "complexTypes": [
668
668
  "MultiDelayConditions"
669
669
  ],
@@ -1076,10 +1076,39 @@
1076
1076
  "text": "1.0.0"
1077
1077
  }
1078
1078
  ],
1079
- "docs": "Remove all event listeners registered for this plugin.\n\nThis unregisters all listeners added via {@link addListener} for all event types:\n- `download`\n- `noNeedUpdate`\n- `updateCheckResult`\n- `updateAvailable`\n- `downloadComplete`\n- `downloadFailed`\n- `breakingAvailable` / `majorAvailable`\n- `updateFailed`\n- `appReloaded`\n- `appReady`\n\nUse this during cleanup (e.g., when unmounting components or closing screens)\nto prevent memory leaks from lingering event listeners.",
1079
+ "docs": "Remove all event listeners registered for this plugin.\n\nThis unregisters all listeners added via {@link addListener} for all event types:\n- `updaterEvent`\n- `download`\n- `noNeedUpdate`\n- `updateCheckResult`\n- `updateAvailable`\n- `downloadComplete`\n- `downloadFailed`\n- `breakingAvailable` / `majorAvailable`\n- `updateFailed`\n- `appReloaded`\n- `appReady`\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
  },
1083
+ {
1084
+ "name": "addListener",
1085
+ "signature": "(eventName: 'updaterEvent', listenerFunc: (event: UpdaterEvent) => void) => Promise<PluginListenerHandle>",
1086
+ "parameters": [
1087
+ {
1088
+ "name": "eventName",
1089
+ "docs": "",
1090
+ "type": "'updaterEvent'"
1091
+ },
1092
+ {
1093
+ "name": "listenerFunc",
1094
+ "docs": "",
1095
+ "type": "(event: UpdaterEvent) => void"
1096
+ }
1097
+ ],
1098
+ "returns": "Promise<PluginListenerHandle>",
1099
+ "tags": [
1100
+ {
1101
+ "name": "since",
1102
+ "text": "8.53.0"
1103
+ }
1104
+ ],
1105
+ "docs": "Listen for every updater event with a single listener.\n\nEach call receives `{ type, data }`: `type` is the event name (`download`, `updateAvailable`,\n`downloadFailed`, `appReady`, ...) and `data` is the payload the matching legacy listener receives.\nWhen the native layer retains an event until a listener attaches (for example `set` and `appReady`),\n`updaterEvent` gets the same retention.\n\nThe per-event listeners below are deprecated and will be removed in v9.\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 }\n});\n```",
1106
+ "complexTypes": [
1107
+ "PluginListenerHandle",
1108
+ "UpdaterEvent"
1109
+ ],
1110
+ "slug": "addlistenerupdaterevent-"
1111
+ },
1083
1112
  {
1084
1113
  "name": "addListener",
1085
1114
  "signature": "(eventName: 'download', listenerFunc: (state: DownloadEvent) => void) => Promise<PluginListenerHandle>",
@@ -1097,6 +1126,10 @@
1097
1126
  ],
1098
1127
  "returns": "Promise<PluginListenerHandle>",
1099
1128
  "tags": [
1129
+ {
1130
+ "name": "deprecated",
1131
+ "text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
1132
+ },
1100
1133
  {
1101
1134
  "name": "since",
1102
1135
  "text": "2.0.11"
@@ -1126,6 +1159,10 @@
1126
1159
  ],
1127
1160
  "returns": "Promise<PluginListenerHandle>",
1128
1161
  "tags": [
1162
+ {
1163
+ "name": "deprecated",
1164
+ "text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
1165
+ },
1129
1166
  {
1130
1167
  "name": "since",
1131
1168
  "text": "4.0.0"
@@ -1155,12 +1192,16 @@
1155
1192
  ],
1156
1193
  "returns": "Promise<PluginListenerHandle>",
1157
1194
  "tags": [
1195
+ {
1196
+ "name": "deprecated",
1197
+ "text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
1198
+ },
1158
1199
  {
1159
1200
  "name": "since",
1160
1201
  "text": "8.45.11"
1161
1202
  }
1162
1203
  ],
1163
- "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 and keeps the existing failure stats behavior.",
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.",
1164
1205
  "complexTypes": [
1165
1206
  "PluginListenerHandle",
1166
1207
  "UpdateCheckResultEvent"
@@ -1184,6 +1225,10 @@
1184
1225
  ],
1185
1226
  "returns": "Promise<PluginListenerHandle>",
1186
1227
  "tags": [
1228
+ {
1229
+ "name": "deprecated",
1230
+ "text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
1231
+ },
1187
1232
  {
1188
1233
  "name": "since",
1189
1234
  "text": "4.0.0"
@@ -1213,6 +1258,10 @@
1213
1258
  ],
1214
1259
  "returns": "Promise<PluginListenerHandle>",
1215
1260
  "tags": [
1261
+ {
1262
+ "name": "deprecated",
1263
+ "text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
1264
+ },
1216
1265
  {
1217
1266
  "name": "since",
1218
1267
  "text": "4.0.0"
@@ -1242,6 +1291,10 @@
1242
1291
  ],
1243
1292
  "returns": "Promise<PluginListenerHandle>",
1244
1293
  "tags": [
1294
+ {
1295
+ "name": "deprecated",
1296
+ "text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
1297
+ },
1245
1298
  {
1246
1299
  "name": "since",
1247
1300
  "text": "7.22.0"
@@ -1304,6 +1357,10 @@
1304
1357
  ],
1305
1358
  "returns": "Promise<PluginListenerHandle>",
1306
1359
  "tags": [
1360
+ {
1361
+ "name": "deprecated",
1362
+ "text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
1363
+ },
1307
1364
  {
1308
1365
  "name": "since",
1309
1366
  "text": "2.3.0"
@@ -1333,6 +1390,10 @@
1333
1390
  ],
1334
1391
  "returns": "Promise<PluginListenerHandle>",
1335
1392
  "tags": [
1393
+ {
1394
+ "name": "deprecated",
1395
+ "text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
1396
+ },
1336
1397
  {
1337
1398
  "name": "since",
1338
1399
  "text": "8.43.12"
@@ -1362,6 +1423,10 @@
1362
1423
  ],
1363
1424
  "returns": "Promise<PluginListenerHandle>",
1364
1425
  "tags": [
1426
+ {
1427
+ "name": "deprecated",
1428
+ "text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
1429
+ },
1365
1430
  {
1366
1431
  "name": "since",
1367
1432
  "text": "6.14.0"
@@ -1391,6 +1456,10 @@
1391
1456
  ],
1392
1457
  "returns": "Promise<PluginListenerHandle>",
1393
1458
  "tags": [
1459
+ {
1460
+ "name": "deprecated",
1461
+ "text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
1462
+ },
1394
1463
  {
1395
1464
  "name": "since",
1396
1465
  "text": "4.0.0"
@@ -1420,6 +1489,10 @@
1420
1489
  ],
1421
1490
  "returns": "Promise<PluginListenerHandle>",
1422
1491
  "tags": [
1492
+ {
1493
+ "name": "deprecated",
1494
+ "text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
1495
+ },
1423
1496
  {
1424
1497
  "name": "since",
1425
1498
  "text": "4.3.0"
@@ -1448,6 +1521,10 @@
1448
1521
  ],
1449
1522
  "returns": "Promise<PluginListenerHandle>",
1450
1523
  "tags": [
1524
+ {
1525
+ "name": "deprecated",
1526
+ "text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
1527
+ },
1451
1528
  {
1452
1529
  "name": "since",
1453
1530
  "text": "5.1.0"
@@ -1477,6 +1554,10 @@
1477
1554
  ],
1478
1555
  "returns": "Promise<PluginListenerHandle>",
1479
1556
  "tags": [
1557
+ {
1558
+ "name": "deprecated",
1559
+ "text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
1560
+ },
1480
1561
  {
1481
1562
  "name": "since",
1482
1563
  "text": "7.34.0"
@@ -1506,6 +1587,10 @@
1506
1587
  ],
1507
1588
  "returns": "Promise<PluginListenerHandle>",
1508
1589
  "tags": [
1590
+ {
1591
+ "name": "deprecated",
1592
+ "text": "Use `addListener('updaterEvent', ...)` and switch on `event.type`. This listener keeps working until v9."
1593
+ },
1509
1594
  {
1510
1595
  "name": "since",
1511
1596
  "text": "8.0.0"
@@ -2651,6 +2736,24 @@
2651
2736
  "DelayCondition"
2652
2737
  ],
2653
2738
  "type": "DelayCondition[]"
2739
+ },
2740
+ {
2741
+ "name": "conditionMode",
2742
+ "tags": [
2743
+ {
2744
+ "text": "'and'",
2745
+ "name": "default"
2746
+ },
2747
+ {
2748
+ "text": "8.50.0",
2749
+ "name": "since"
2750
+ }
2751
+ ],
2752
+ "docs": "How to combine multiple delay conditions.",
2753
+ "complexTypes": [
2754
+ "DelayConditionMode"
2755
+ ],
2756
+ "type": "DelayConditionMode"
2654
2757
  }
2655
2758
  ]
2656
2759
  },
@@ -3713,6 +3816,27 @@
3713
3816
  }
3714
3817
  ]
3715
3818
  },
3819
+ {
3820
+ "name": "DownloadFailedEvent",
3821
+ "slug": "downloadfailedevent",
3822
+ "docs": "",
3823
+ "tags": [],
3824
+ "methods": [],
3825
+ "properties": [
3826
+ {
3827
+ "name": "version",
3828
+ "tags": [
3829
+ {
3830
+ "text": "4.0.0",
3831
+ "name": "since"
3832
+ }
3833
+ ],
3834
+ "docs": "Emit when a download fail.",
3835
+ "complexTypes": [],
3836
+ "type": "string"
3837
+ }
3838
+ ]
3839
+ },
3716
3840
  {
3717
3841
  "name": "MajorAvailableEvent",
3718
3842
  "slug": "majoravailableevent",
@@ -3807,27 +3931,6 @@
3807
3931
  }
3808
3932
  ]
3809
3933
  },
3810
- {
3811
- "name": "DownloadFailedEvent",
3812
- "slug": "downloadfailedevent",
3813
- "docs": "",
3814
- "tags": [],
3815
- "methods": [],
3816
- "properties": [
3817
- {
3818
- "name": "version",
3819
- "tags": [
3820
- {
3821
- "text": "4.0.0",
3822
- "name": "since"
3823
- }
3824
- ],
3825
- "docs": "Emit when a download fail.",
3826
- "complexTypes": [],
3827
- "type": "string"
3828
- }
3829
- ]
3830
- },
3831
3934
  {
3832
3935
  "name": "AppReadyEvent",
3833
3936
  "slug": "appreadyevent",
@@ -4502,6 +4605,21 @@
4502
4605
  }
4503
4606
  ]
4504
4607
  },
4608
+ {
4609
+ "name": "DelayConditionMode",
4610
+ "slug": "delayconditionmode",
4611
+ "docs": "How multiple delay conditions are combined when more than one is set.\n\n- `and`: every condition must be satisfied before the pending update is applied (default, backward compatible).\n- `or`: the pending update is applied as soon as any condition is satisfied.",
4612
+ "types": [
4613
+ {
4614
+ "text": "'and'",
4615
+ "complexTypes": []
4616
+ },
4617
+ {
4618
+ "text": "'or'",
4619
+ "complexTypes": []
4620
+ }
4621
+ ]
4622
+ },
4505
4623
  {
4506
4624
  "name": "UpdateResponseKind",
4507
4625
  "slug": "updateresponsekind",
@@ -4521,6 +4639,97 @@
4521
4639
  }
4522
4640
  ]
4523
4641
  },
4642
+ {
4643
+ "name": "UpdaterEvent",
4644
+ "slug": "updaterevent",
4645
+ "docs": "Payload of the single `updaterEvent` listener: every plugin event as `{ type, data }`.\n`type` is the legacy event name and `data` is the same payload the legacy listener receives,\nso you can switch on `type` and get a typed `data`.\n\nThe deprecated `majorAvailable` alias is not forwarded: use `breakingAvailable`.",
4646
+ "types": [
4647
+ {
4648
+ "text": "{ type: 'download'; data: DownloadEvent }",
4649
+ "complexTypes": [
4650
+ "DownloadEvent"
4651
+ ]
4652
+ },
4653
+ {
4654
+ "text": "{ type: 'noNeedUpdate'; data: NoNeedEvent }",
4655
+ "complexTypes": [
4656
+ "NoNeedEvent"
4657
+ ]
4658
+ },
4659
+ {
4660
+ "text": "{ type: 'updateCheckResult'; data: UpdateCheckResultEvent }",
4661
+ "complexTypes": [
4662
+ "UpdateCheckResultEvent"
4663
+ ]
4664
+ },
4665
+ {
4666
+ "text": "{ type: 'updateAvailable'; data: UpdateAvailableEvent }",
4667
+ "complexTypes": [
4668
+ "UpdateAvailableEvent"
4669
+ ]
4670
+ },
4671
+ {
4672
+ "text": "{ type: 'downloadComplete'; data: DownloadCompleteEvent }",
4673
+ "complexTypes": [
4674
+ "DownloadCompleteEvent"
4675
+ ]
4676
+ },
4677
+ {
4678
+ "text": "{ type: 'downloadFailed'; data: DownloadFailedEvent }",
4679
+ "complexTypes": [
4680
+ "DownloadFailedEvent"
4681
+ ]
4682
+ },
4683
+ {
4684
+ "text": "{ type: 'breakingAvailable'; data: BreakingAvailableEvent }",
4685
+ "complexTypes": [
4686
+ "BreakingAvailableEvent"
4687
+ ]
4688
+ },
4689
+ {
4690
+ "text": "{ type: 'updateFailed'; data: UpdateFailedEvent }",
4691
+ "complexTypes": [
4692
+ "UpdateFailedEvent"
4693
+ ]
4694
+ },
4695
+ {
4696
+ "text": "{ type: 'set'; data: SetEvent }",
4697
+ "complexTypes": [
4698
+ "SetEvent"
4699
+ ]
4700
+ },
4701
+ {
4702
+ "text": "{ type: 'setNext'; data: SetNextEvent }",
4703
+ "complexTypes": [
4704
+ "SetNextEvent"
4705
+ ]
4706
+ },
4707
+ {
4708
+ "text": "{ type: 'appReloaded'; data: Record<string, never> }",
4709
+ "complexTypes": [
4710
+ "Record"
4711
+ ]
4712
+ },
4713
+ {
4714
+ "text": "{ type: 'appReady'; data: AppReadyEvent }",
4715
+ "complexTypes": [
4716
+ "AppReadyEvent"
4717
+ ]
4718
+ },
4719
+ {
4720
+ "text": "{ type: 'channelPrivate'; data: ChannelPrivateEvent }",
4721
+ "complexTypes": [
4722
+ "ChannelPrivateEvent"
4723
+ ]
4724
+ },
4725
+ {
4726
+ "text": "{ type: 'onFlexibleUpdateStateChange'; data: FlexibleUpdateState }",
4727
+ "complexTypes": [
4728
+ "FlexibleUpdateState"
4729
+ ]
4730
+ }
4731
+ ]
4732
+ },
4524
4733
  {
4525
4734
  "name": "BreakingAvailableEvent",
4526
4735
  "slug": "breakingavailableevent",
@@ -4534,6 +4743,20 @@
4534
4743
  }
4535
4744
  ]
4536
4745
  },
4746
+ {
4747
+ "name": "Record",
4748
+ "slug": "record",
4749
+ "docs": "Construct a type with a set of properties K of type T",
4750
+ "types": [
4751
+ {
4752
+ "text": "{\r\n [P in K]: T;\r\n}",
4753
+ "complexTypes": [
4754
+ "K",
4755
+ "T"
4756
+ ]
4757
+ }
4758
+ ]
4759
+ },
4537
4760
  {
4538
4761
  "name": "ShakeMenuGesture",
4539
4762
  "slug": "shakemenugesture",
@@ -4695,7 +4918,7 @@
4695
4918
  "name": "example"
4696
4919
  }
4697
4920
  ],
4698
- "docs": "Configure the URL / endpoint to which update statistics are sent.\n\nOnly available for Android and iOS. Set to \"\" to disable stats reporting.\nNative stats include update lifecycle events, app health signals such as crashes,\nAndroid ANRs, low-memory exits, iOS memory warnings, and WebView health signals\nsuch as JavaScript errors, unhandled promise rejections, resource load failures,\nWebView renderer exits, unclean WebView restarts, app launch readiness timing,\nand WebView load milestones when available.",
4921
+ "docs": "Configure the URL / endpoint to which update statistics are sent.\n\nOnly available for Android and iOS. Set to \"\" to disable stats reporting.\nNative stats include update lifecycle events, app health signals such as crashes,\nAndroid ANRs, low-memory exits, iOS memory warnings, and WebView health signals\nsuch as JavaScript errors, unhandled promise rejections, resource load failures,\nWebView renderer exits, unclean WebView restarts, app launch readiness timing,\nand WebView load milestones when available.\n\nFailed background update checks that never start a download (network errors, timeouts,\nnon-2xx responses, unreadable payloads) are reported as `update_check_error` with\n`metadata.error` and optional `metadata.status_code`, not as `download_fail`.\nSelf-hosted Capgo backends must allow the `update_check_error` stats action.",
4699
4922
  "complexTypes": [],
4700
4923
  "type": "string | undefined"
4701
4924
  },
@@ -4947,6 +5170,22 @@
4947
5170
  "complexTypes": [],
4948
5171
  "type": "boolean | undefined"
4949
5172
  },
5173
+ {
5174
+ "name": "allowHttpsToHttpRedirect",
5175
+ "tags": [
5176
+ {
5177
+ "text": "false",
5178
+ "name": "default"
5179
+ },
5180
+ {
5181
+ "text": "8.52.0",
5182
+ "name": "since"
5183
+ }
5184
+ ],
5185
+ "docs": "Allow the plugin to follow redirects from HTTPS to plain HTTP for its own network requests\n(update checks, stats, channel calls, and bundle/manifest downloads).\n\nBlocked by default so a redirect can never downgrade updater traffic to an unencrypted connection.\nOnly enable this if your self-hosted update server or CDN must redirect to an HTTP URL.\nDirect HTTP URLs (for example `localApi` during development) are not affected.\n\nOnly available for Android and iOS.",
5186
+ "complexTypes": [],
5187
+ "type": "boolean | undefined"
5188
+ },
4950
5189
  {
4951
5190
  "name": "allowModifyAppId",
4952
5191
  "tags": [
@@ -5188,6 +5427,134 @@
5188
5427
  "docs": "Enable the native menu gesture to show a channel selector menu for switching between update channels.\nIf {@link PluginsConfig.CapacitorUpdater.shakeMenu} is also enabled while a preview session is active,\nthe shake menu includes both preview actions and channel switching.\nThe native gesture can be changed with {@link PluginsConfig.CapacitorUpdater.shakeMenuGesture}.\n\nOnly available for Android and iOS.",
5189
5428
  "complexTypes": [],
5190
5429
  "type": "boolean | undefined"
5430
+ },
5431
+ {
5432
+ "name": "nativeUpdatePrompt",
5433
+ "tags": [
5434
+ {
5435
+ "text": "false",
5436
+ "name": "default"
5437
+ },
5438
+ {
5439
+ "text": "8.53.0",
5440
+ "name": "since"
5441
+ }
5442
+ ],
5443
+ "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` / `majorAvailable` flows.\n\nOnly available for Android and iOS. No-op on web.",
5444
+ "complexTypes": [],
5445
+ "type": "boolean | undefined"
5446
+ },
5447
+ {
5448
+ "name": "nativeUpdatePromptTitle",
5449
+ "tags": [
5450
+ {
5451
+ "text": "\"Update available\"",
5452
+ "name": "default"
5453
+ },
5454
+ {
5455
+ "text": "8.53.0",
5456
+ "name": "since"
5457
+ }
5458
+ ],
5459
+ "docs": "Optional title for the native store update dialog shown when {@link PluginsConfig.CapacitorUpdater.nativeUpdatePrompt} is enabled.\n\nOnly available for Android and iOS.",
5460
+ "complexTypes": [],
5461
+ "type": "string | undefined"
5462
+ },
5463
+ {
5464
+ "name": "nativeUpdatePromptMessage",
5465
+ "tags": [
5466
+ {
5467
+ "text": "A short message explaining that a newer native app is available in the store.",
5468
+ "name": "default"
5469
+ },
5470
+ {
5471
+ "text": "8.53.0",
5472
+ "name": "since"
5473
+ }
5474
+ ],
5475
+ "docs": "Optional message body for the native store update dialog shown when {@link PluginsConfig.CapacitorUpdater.nativeUpdatePrompt} is enabled.\n\nOnly available for Android and iOS.",
5476
+ "complexTypes": [],
5477
+ "type": "string | undefined"
5478
+ },
5479
+ {
5480
+ "name": "nativeUpdatePromptUpdateButton",
5481
+ "tags": [
5482
+ {
5483
+ "text": "\"Update\"",
5484
+ "name": "default"
5485
+ },
5486
+ {
5487
+ "text": "8.53.0",
5488
+ "name": "since"
5489
+ }
5490
+ ],
5491
+ "docs": "Optional label for the primary action button that opens the store or starts an in-app update on Android.\n\nOnly available for Android and iOS.",
5492
+ "complexTypes": [],
5493
+ "type": "string | undefined"
5494
+ },
5495
+ {
5496
+ "name": "nativeUpdatePromptLaterButton",
5497
+ "tags": [
5498
+ {
5499
+ "text": "\"Not now\"",
5500
+ "name": "default"
5501
+ },
5502
+ {
5503
+ "text": "8.53.0",
5504
+ "name": "since"
5505
+ }
5506
+ ],
5507
+ "docs": "Optional label for the dismiss action on the native store update dialog.\n\nOnly available for Android and iOS.",
5508
+ "complexTypes": [],
5509
+ "type": "string | undefined"
5510
+ },
5511
+ {
5512
+ "name": "nativeUpdatePromptCountry",
5513
+ "tags": [
5514
+ {
5515
+ "text": "undefined (show in all regions)",
5516
+ "name": "default"
5517
+ },
5518
+ {
5519
+ "text": "8.53.0",
5520
+ "name": "since"
5521
+ }
5522
+ ],
5523
+ "docs": "Optional ISO 3166-1 alpha-2 country filter. When set, the prompt is shown only when the device region matches\none of the comma-separated country codes (for example `\"US\"` or `\"US,CA\"`).\n\nOnly available for Android and iOS.",
5524
+ "complexTypes": [],
5525
+ "type": "string | undefined"
5526
+ },
5527
+ {
5528
+ "name": "nativeUpdatePromptOnStoreCheck",
5529
+ "tags": [
5530
+ {
5531
+ "text": "false",
5532
+ "name": "default"
5533
+ },
5534
+ {
5535
+ "text": "8.53.0",
5536
+ "name": "since"
5537
+ }
5538
+ ],
5539
+ "docs": "When {@link PluginsConfig.CapacitorUpdater.nativeUpdatePrompt} is enabled, also show the dialog when {@link CapacitorUpdaterPlugin.getAppUpdateInfo}\nreports that a store update is available.\n\nOnly available for Android and iOS.",
5540
+ "complexTypes": [],
5541
+ "type": "boolean | undefined"
5542
+ },
5543
+ {
5544
+ "name": "nativeUpdatePromptCooldownHours",
5545
+ "tags": [
5546
+ {
5547
+ "text": "24",
5548
+ "name": "default"
5549
+ },
5550
+ {
5551
+ "text": "8.53.0",
5552
+ "name": "since"
5553
+ }
5554
+ ],
5555
+ "docs": "Minimum hours between native update prompts for the same native app version. Also limited to once per app session.\n\nOnly available for Android and iOS.",
5556
+ "complexTypes": [],
5557
+ "type": "number | undefined"
5191
5558
  }
5192
5559
  ],
5193
5560
  "docs": "CapacitorUpdater can be configured with these options:"