@capgo/capacitor-updater 7.23.3 → 7.24.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/README.md +117 -94
- package/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdaterPlugin.java +16 -18
- package/android/src/main/java/ee/forgr/capacitor_updater/CapgoUpdater.java +149 -3
- package/android/src/main/java/ee/forgr/capacitor_updater/DeviceIdHelper.java +221 -0
- package/android/src/main/java/ee/forgr/capacitor_updater/DownloadService.java +1 -1
- package/android/src/main/java/ee/forgr/capacitor_updater/DownloadWorkerManager.java +1 -1
- package/dist/docs.json +1 -1
- package/dist/esm/definitions.d.ts +10 -1
- package/dist/esm/definitions.js.map +1 -1
- package/ios/Sources/CapacitorUpdaterPlugin/CapacitorUpdaterPlugin.swift +14 -21
- package/ios/Sources/CapacitorUpdaterPlugin/CapgoUpdater.swift +140 -4
- package/ios/Sources/CapacitorUpdaterPlugin/DeviceIdHelper.swift +120 -0
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -16,14 +16,27 @@
|
|
|
16
16
|
[](https://console.algora.io/org/Capgo/bounties?status=completed)
|
|
17
17
|
|
|
18
18
|
<div align="center">
|
|
19
|
-
<h2><a href="https://capgo.app/?ref=
|
|
20
|
-
<h2><a href="https://capgo.app/consulting/?ref=
|
|
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
21
|
</div>
|
|
22
22
|
|
|
23
23
|
Capacitor plugin to update your app remotely in real-time.
|
|
24
24
|
|
|
25
25
|
Open-source Alternative to Appflow, Codepush or Capawesome
|
|
26
26
|
|
|
27
|
+
## Why Capacitor Updater?
|
|
28
|
+
|
|
29
|
+
App store review processes can take days or weeks, blocking critical bug fixes and updates from reaching your users. Capacitor Updater solves this by:
|
|
30
|
+
|
|
31
|
+
- **Instant updates** - Push JavaScript/HTML/CSS updates directly to users without app store review
|
|
32
|
+
- **Delta updates** - Only download changed files, making updates ultra-fast
|
|
33
|
+
- **Rollback protection** - Automatically revert broken updates to keep your app stable
|
|
34
|
+
- **Open source** - Self-host or use Capgo Cloud, with full control over your update infrastructure
|
|
35
|
+
- **Battle-tested** - Used by 3000+ production apps with proven reliability
|
|
36
|
+
- **Most stared** - Capacitor updater is the most stared Capacitor plugin on GitHub
|
|
37
|
+
|
|
38
|
+
Perfect for fixing bugs immediately, A/B testing features, and maintaining control over your release schedule.
|
|
39
|
+
|
|
27
40
|
## Features
|
|
28
41
|
|
|
29
42
|
- ☁️ Cloud / Self hosted Support: Use our [Cloud](https://capgo.app/) to manage your app updates or yours.
|
|
@@ -63,7 +76,7 @@ Join the [discord](https://discord.gg/VnYRvBfgA6) to get help.
|
|
|
63
76
|
| Plugin version | Capacitor compatibility | Maintained |
|
|
64
77
|
| -------------- | ----------------------- | ----------------- |
|
|
65
78
|
| v7.\*.\* | v7.\*.\* | ✅ |
|
|
66
|
-
| v6.\*.\* | v6.\*.\* |
|
|
79
|
+
| v6.\*.\* | v6.\*.\* | ✅ |
|
|
67
80
|
| v5.\*.\* | v5.\*.\* | ⚠️ Deprecated |
|
|
68
81
|
| v4.\*.\* | v4.\*.\* | ⚠️ Deprecated |
|
|
69
82
|
| v3.\*.\* | v3.\*.\* | ⚠️ Deprecated |
|
|
@@ -111,7 +124,7 @@ npx cap sync
|
|
|
111
124
|
|
|
112
125
|
## Auto-update setup
|
|
113
126
|
|
|
114
|
-
Create your account in [capgo.app](https://capgo.app) and get your [API key](https://
|
|
127
|
+
Create your account in [capgo.app](https://capgo.app) and get your [API key](https://console.capgo.app/dashboard/apikeys)
|
|
115
128
|
- Login to CLI `npx @capgo/cli@latest init API_KEY`
|
|
116
129
|
And follow the steps by step to setup your app.
|
|
117
130
|
|
|
@@ -365,6 +378,7 @@ export default config;
|
|
|
365
378
|
## API
|
|
366
379
|
|
|
367
380
|
<docgen-index>
|
|
381
|
+
<!--Auto-generated, compact index-->
|
|
368
382
|
|
|
369
383
|
* [`notifyAppReady()`](#notifyappready)
|
|
370
384
|
* [`setUpdateUrl(...)`](#setupdateurl)
|
|
@@ -417,7 +431,7 @@ export default config;
|
|
|
417
431
|
<docgen-api>
|
|
418
432
|
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
|
|
419
433
|
|
|
420
|
-
|
|
434
|
+
#### notifyAppReady()
|
|
421
435
|
|
|
422
436
|
```typescript
|
|
423
437
|
notifyAppReady() => Promise<AppReadyResult>
|
|
@@ -432,7 +446,7 @@ Change this behaviour with {@link appReadyTimeout}
|
|
|
432
446
|
--------------------
|
|
433
447
|
|
|
434
448
|
|
|
435
|
-
|
|
449
|
+
#### setUpdateUrl(...)
|
|
436
450
|
|
|
437
451
|
```typescript
|
|
438
452
|
setUpdateUrl(options: UpdateUrl) => Promise<void>
|
|
@@ -449,7 +463,7 @@ Set the updateUrl for the app, this will be used to check for updates.
|
|
|
449
463
|
--------------------
|
|
450
464
|
|
|
451
465
|
|
|
452
|
-
|
|
466
|
+
#### setStatsUrl(...)
|
|
453
467
|
|
|
454
468
|
```typescript
|
|
455
469
|
setStatsUrl(options: StatsUrl) => Promise<void>
|
|
@@ -466,7 +480,7 @@ Set the statsUrl for the app, this will be used to send statistics. Passing an e
|
|
|
466
480
|
--------------------
|
|
467
481
|
|
|
468
482
|
|
|
469
|
-
|
|
483
|
+
#### setChannelUrl(...)
|
|
470
484
|
|
|
471
485
|
```typescript
|
|
472
486
|
setChannelUrl(options: ChannelUrl) => Promise<void>
|
|
@@ -483,7 +497,7 @@ Set the channelUrl for the app, this will be used to set the channel.
|
|
|
483
497
|
--------------------
|
|
484
498
|
|
|
485
499
|
|
|
486
|
-
|
|
500
|
+
#### download(...)
|
|
487
501
|
|
|
488
502
|
```typescript
|
|
489
503
|
download(options: DownloadOptions) => Promise<BundleInfo>
|
|
@@ -500,7 +514,7 @@ Download a new bundle from the provided URL, it should be a zip file, with files
|
|
|
500
514
|
--------------------
|
|
501
515
|
|
|
502
516
|
|
|
503
|
-
|
|
517
|
+
#### next(...)
|
|
504
518
|
|
|
505
519
|
```typescript
|
|
506
520
|
next(options: BundleId) => Promise<BundleInfo>
|
|
@@ -517,7 +531,7 @@ Set the next bundle to be used when the app is reloaded.
|
|
|
517
531
|
--------------------
|
|
518
532
|
|
|
519
533
|
|
|
520
|
-
|
|
534
|
+
#### set(...)
|
|
521
535
|
|
|
522
536
|
```typescript
|
|
523
537
|
set(options: BundleId) => Promise<void>
|
|
@@ -532,7 +546,7 @@ Set the current bundle and immediately reloads the app.
|
|
|
532
546
|
--------------------
|
|
533
547
|
|
|
534
548
|
|
|
535
|
-
|
|
549
|
+
#### delete(...)
|
|
536
550
|
|
|
537
551
|
```typescript
|
|
538
552
|
delete(options: BundleId) => Promise<void>
|
|
@@ -547,7 +561,7 @@ Deletes the specified bundle from the native app storage. Use with {@link list}
|
|
|
547
561
|
--------------------
|
|
548
562
|
|
|
549
563
|
|
|
550
|
-
|
|
564
|
+
#### setBundleError(...)
|
|
551
565
|
|
|
552
566
|
```typescript
|
|
553
567
|
setBundleError(options: BundleId) => Promise<BundleInfo>
|
|
@@ -566,7 +580,7 @@ Mark an installed bundle as errored. Only available when {@link PluginsConfig.Ca
|
|
|
566
580
|
--------------------
|
|
567
581
|
|
|
568
582
|
|
|
569
|
-
|
|
583
|
+
#### list(...)
|
|
570
584
|
|
|
571
585
|
```typescript
|
|
572
586
|
list(options?: ListOptions | undefined) => Promise<BundleListResult>
|
|
@@ -583,7 +597,7 @@ Get all locally downloaded bundles in your app
|
|
|
583
597
|
--------------------
|
|
584
598
|
|
|
585
599
|
|
|
586
|
-
|
|
600
|
+
#### reset(...)
|
|
587
601
|
|
|
588
602
|
```typescript
|
|
589
603
|
reset(options?: ResetOptions | undefined) => Promise<void>
|
|
@@ -598,7 +612,7 @@ Reset the app to the `builtin` bundle (the one sent to Apple App Store / Google
|
|
|
598
612
|
--------------------
|
|
599
613
|
|
|
600
614
|
|
|
601
|
-
|
|
615
|
+
#### current()
|
|
602
616
|
|
|
603
617
|
```typescript
|
|
604
618
|
current() => Promise<CurrentBundleResult>
|
|
@@ -611,7 +625,7 @@ Get the current bundle, if none are set it returns `builtin`. currentNative is t
|
|
|
611
625
|
--------------------
|
|
612
626
|
|
|
613
627
|
|
|
614
|
-
|
|
628
|
+
#### reload()
|
|
615
629
|
|
|
616
630
|
```typescript
|
|
617
631
|
reload() => Promise<void>
|
|
@@ -622,7 +636,7 @@ Reload the view
|
|
|
622
636
|
--------------------
|
|
623
637
|
|
|
624
638
|
|
|
625
|
-
|
|
639
|
+
#### setMultiDelay(...)
|
|
626
640
|
|
|
627
641
|
```typescript
|
|
628
642
|
setMultiDelay(options: MultiDelayConditions) => Promise<void>
|
|
@@ -645,7 +659,7 @@ The function has unconsistent behavior the option kill do trigger the update aft
|
|
|
645
659
|
--------------------
|
|
646
660
|
|
|
647
661
|
|
|
648
|
-
|
|
662
|
+
#### cancelDelay()
|
|
649
663
|
|
|
650
664
|
```typescript
|
|
651
665
|
cancelDelay() => Promise<void>
|
|
@@ -658,7 +672,7 @@ Cancels a {@link <a href="#delaycondition">DelayCondition</a>} to process an upd
|
|
|
658
672
|
--------------------
|
|
659
673
|
|
|
660
674
|
|
|
661
|
-
|
|
675
|
+
#### getLatest(...)
|
|
662
676
|
|
|
663
677
|
```typescript
|
|
664
678
|
getLatest(options?: GetLatestOptions | undefined) => Promise<LatestVersion>
|
|
@@ -677,7 +691,7 @@ Get Latest bundle available from update Url
|
|
|
677
691
|
--------------------
|
|
678
692
|
|
|
679
693
|
|
|
680
|
-
|
|
694
|
+
#### setChannel(...)
|
|
681
695
|
|
|
682
696
|
```typescript
|
|
683
697
|
setChannel(options: SetChannelOptions) => Promise<ChannelRes>
|
|
@@ -700,7 +714,7 @@ This methods send to Capgo backend a request to link the device ID to the channe
|
|
|
700
714
|
--------------------
|
|
701
715
|
|
|
702
716
|
|
|
703
|
-
|
|
717
|
+
#### unsetChannel(...)
|
|
704
718
|
|
|
705
719
|
```typescript
|
|
706
720
|
unsetChannel(options: UnsetChannelOptions) => Promise<void>
|
|
@@ -717,7 +731,7 @@ Unset the channel for this device. The device will then return to the default ch
|
|
|
717
731
|
--------------------
|
|
718
732
|
|
|
719
733
|
|
|
720
|
-
|
|
734
|
+
#### getChannel()
|
|
721
735
|
|
|
722
736
|
```typescript
|
|
723
737
|
getChannel() => Promise<GetChannelRes>
|
|
@@ -732,7 +746,7 @@ Get the channel for this device
|
|
|
732
746
|
--------------------
|
|
733
747
|
|
|
734
748
|
|
|
735
|
-
|
|
749
|
+
#### listChannels()
|
|
736
750
|
|
|
737
751
|
```typescript
|
|
738
752
|
listChannels() => Promise<ListChannelsResult>
|
|
@@ -747,7 +761,7 @@ List all channels available for this device that allow self-assignment
|
|
|
747
761
|
--------------------
|
|
748
762
|
|
|
749
763
|
|
|
750
|
-
|
|
764
|
+
#### setCustomId(...)
|
|
751
765
|
|
|
752
766
|
```typescript
|
|
753
767
|
setCustomId(options: SetCustomIdOptions) => Promise<void>
|
|
@@ -767,7 +781,7 @@ Pass an empty string to remove any previously stored customId.
|
|
|
767
781
|
--------------------
|
|
768
782
|
|
|
769
783
|
|
|
770
|
-
|
|
784
|
+
#### getBuiltinVersion()
|
|
771
785
|
|
|
772
786
|
```typescript
|
|
773
787
|
getBuiltinVersion() => Promise<BuiltinVersion>
|
|
@@ -782,20 +796,29 @@ Get the native app version or the builtin version if set in config
|
|
|
782
796
|
--------------------
|
|
783
797
|
|
|
784
798
|
|
|
785
|
-
|
|
799
|
+
#### getDeviceId()
|
|
786
800
|
|
|
787
801
|
```typescript
|
|
788
802
|
getDeviceId() => Promise<DeviceId>
|
|
789
803
|
```
|
|
790
804
|
|
|
791
|
-
Get unique ID used to identify device (sent to auto update server)
|
|
805
|
+
Get unique ID used to identify device (sent to auto update server).
|
|
806
|
+
|
|
807
|
+
This ID is privacy-friendly and follows Apple and Google best practices:
|
|
808
|
+
- Generated as a UUID and stored securely
|
|
809
|
+
- Android: Uses EncryptedSharedPreferences with Auto Backup (persists across reinstalls)
|
|
810
|
+
- iOS: Uses Keychain with kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly (persists across reinstalls)
|
|
811
|
+
- Data stays on device (not synced to cloud on iOS)
|
|
812
|
+
- Can be cleared by user via system settings (Android) or keychain access (iOS)
|
|
813
|
+
|
|
814
|
+
The device ID now persists between app reinstalls to maintain consistent device identity.
|
|
792
815
|
|
|
793
816
|
**Returns:** <code>Promise<<a href="#deviceid">DeviceId</a>></code>
|
|
794
817
|
|
|
795
818
|
--------------------
|
|
796
819
|
|
|
797
820
|
|
|
798
|
-
|
|
821
|
+
#### getPluginVersion()
|
|
799
822
|
|
|
800
823
|
```typescript
|
|
801
824
|
getPluginVersion() => Promise<PluginVersion>
|
|
@@ -808,7 +831,7 @@ Get the native Capacitor Updater plugin version (sent to auto update server)
|
|
|
808
831
|
--------------------
|
|
809
832
|
|
|
810
833
|
|
|
811
|
-
|
|
834
|
+
#### isAutoUpdateEnabled()
|
|
812
835
|
|
|
813
836
|
```typescript
|
|
814
837
|
isAutoUpdateEnabled() => Promise<AutoUpdateEnabled>
|
|
@@ -821,7 +844,7 @@ Get the state of auto update config.
|
|
|
821
844
|
--------------------
|
|
822
845
|
|
|
823
846
|
|
|
824
|
-
|
|
847
|
+
#### removeAllListeners()
|
|
825
848
|
|
|
826
849
|
```typescript
|
|
827
850
|
removeAllListeners() => Promise<void>
|
|
@@ -834,7 +857,7 @@ Remove all listeners for this plugin.
|
|
|
834
857
|
--------------------
|
|
835
858
|
|
|
836
859
|
|
|
837
|
-
|
|
860
|
+
#### addListener('download', ...)
|
|
838
861
|
|
|
839
862
|
```typescript
|
|
840
863
|
addListener(eventName: 'download', listenerFunc: (state: DownloadEvent) => void) => Promise<PluginListenerHandle>
|
|
@@ -855,7 +878,7 @@ This will return you all download percent during the download
|
|
|
855
878
|
--------------------
|
|
856
879
|
|
|
857
880
|
|
|
858
|
-
|
|
881
|
+
#### addListener('noNeedUpdate', ...)
|
|
859
882
|
|
|
860
883
|
```typescript
|
|
861
884
|
addListener(eventName: 'noNeedUpdate', listenerFunc: (state: NoNeedEvent) => void) => Promise<PluginListenerHandle>
|
|
@@ -875,7 +898,7 @@ Listen for no need to update event, useful when you want force check every time
|
|
|
875
898
|
--------------------
|
|
876
899
|
|
|
877
900
|
|
|
878
|
-
|
|
901
|
+
#### addListener('updateAvailable', ...)
|
|
879
902
|
|
|
880
903
|
```typescript
|
|
881
904
|
addListener(eventName: 'updateAvailable', listenerFunc: (state: UpdateAvailableEvent) => void) => Promise<PluginListenerHandle>
|
|
@@ -895,7 +918,7 @@ Listen for available update event, useful when you want to force check every tim
|
|
|
895
918
|
--------------------
|
|
896
919
|
|
|
897
920
|
|
|
898
|
-
|
|
921
|
+
#### addListener('downloadComplete', ...)
|
|
899
922
|
|
|
900
923
|
```typescript
|
|
901
924
|
addListener(eventName: 'downloadComplete', listenerFunc: (state: DownloadCompleteEvent) => void) => Promise<PluginListenerHandle>
|
|
@@ -915,7 +938,7 @@ Listen for downloadComplete events.
|
|
|
915
938
|
--------------------
|
|
916
939
|
|
|
917
940
|
|
|
918
|
-
|
|
941
|
+
#### addListener('breakingAvailable', ...)
|
|
919
942
|
|
|
920
943
|
```typescript
|
|
921
944
|
addListener(eventName: 'breakingAvailable', listenerFunc: (state: BreakingAvailableEvent) => void) => Promise<PluginListenerHandle>
|
|
@@ -936,7 +959,7 @@ Emits the same payload as the legacy `majorAvailable` listener.
|
|
|
936
959
|
--------------------
|
|
937
960
|
|
|
938
961
|
|
|
939
|
-
|
|
962
|
+
#### addListener('majorAvailable', ...)
|
|
940
963
|
|
|
941
964
|
```typescript
|
|
942
965
|
addListener(eventName: 'majorAvailable', listenerFunc: (state: MajorAvailableEvent) => void) => Promise<PluginListenerHandle>
|
|
@@ -956,7 +979,7 @@ Listen for Major update event in the App, let you know when major update is bloc
|
|
|
956
979
|
--------------------
|
|
957
980
|
|
|
958
981
|
|
|
959
|
-
|
|
982
|
+
#### addListener('updateFailed', ...)
|
|
960
983
|
|
|
961
984
|
```typescript
|
|
962
985
|
addListener(eventName: 'updateFailed', listenerFunc: (state: UpdateFailedEvent) => void) => Promise<PluginListenerHandle>
|
|
@@ -976,7 +999,7 @@ Listen for update fail event in the App, let you know when update has fail to in
|
|
|
976
999
|
--------------------
|
|
977
1000
|
|
|
978
1001
|
|
|
979
|
-
|
|
1002
|
+
#### addListener('downloadFailed', ...)
|
|
980
1003
|
|
|
981
1004
|
```typescript
|
|
982
1005
|
addListener(eventName: 'downloadFailed', listenerFunc: (state: DownloadFailedEvent) => void) => Promise<PluginListenerHandle>
|
|
@@ -996,7 +1019,7 @@ Listen for download fail event in the App, let you know when a bundle download h
|
|
|
996
1019
|
--------------------
|
|
997
1020
|
|
|
998
1021
|
|
|
999
|
-
|
|
1022
|
+
#### addListener('appReloaded', ...)
|
|
1000
1023
|
|
|
1001
1024
|
```typescript
|
|
1002
1025
|
addListener(eventName: 'appReloaded', listenerFunc: () => void) => Promise<PluginListenerHandle>
|
|
@@ -1016,7 +1039,7 @@ Listen for reload event in the App, let you know when reload has happened
|
|
|
1016
1039
|
--------------------
|
|
1017
1040
|
|
|
1018
1041
|
|
|
1019
|
-
|
|
1042
|
+
#### addListener('appReady', ...)
|
|
1020
1043
|
|
|
1021
1044
|
```typescript
|
|
1022
1045
|
addListener(eventName: 'appReady', listenerFunc: (state: AppReadyEvent) => void) => Promise<PluginListenerHandle>
|
|
@@ -1036,7 +1059,7 @@ Listen for app ready event in the App, let you know when app is ready to use, th
|
|
|
1036
1059
|
--------------------
|
|
1037
1060
|
|
|
1038
1061
|
|
|
1039
|
-
|
|
1062
|
+
#### isAutoUpdateAvailable()
|
|
1040
1063
|
|
|
1041
1064
|
```typescript
|
|
1042
1065
|
isAutoUpdateAvailable() => Promise<AutoUpdateAvailable>
|
|
@@ -1049,7 +1072,7 @@ Get if auto update is available (not disabled by serverUrl).
|
|
|
1049
1072
|
--------------------
|
|
1050
1073
|
|
|
1051
1074
|
|
|
1052
|
-
|
|
1075
|
+
#### getNextBundle()
|
|
1053
1076
|
|
|
1054
1077
|
```typescript
|
|
1055
1078
|
getNextBundle() => Promise<BundleInfo | null>
|
|
@@ -1065,7 +1088,7 @@ Returns null if no next bundle is set.
|
|
|
1065
1088
|
--------------------
|
|
1066
1089
|
|
|
1067
1090
|
|
|
1068
|
-
|
|
1091
|
+
#### getFailedUpdate()
|
|
1069
1092
|
|
|
1070
1093
|
```typescript
|
|
1071
1094
|
getFailedUpdate() => Promise<UpdateFailedEvent | null>
|
|
@@ -1080,7 +1103,7 @@ Get the most recent update that failed to install, if any. The stored value is c
|
|
|
1080
1103
|
--------------------
|
|
1081
1104
|
|
|
1082
1105
|
|
|
1083
|
-
|
|
1106
|
+
#### setShakeMenu(...)
|
|
1084
1107
|
|
|
1085
1108
|
```typescript
|
|
1086
1109
|
setShakeMenu(options: SetShakeMenuOptions) => Promise<void>
|
|
@@ -1097,7 +1120,7 @@ Enable or disable the shake menu for debugging/testing purposes
|
|
|
1097
1120
|
--------------------
|
|
1098
1121
|
|
|
1099
1122
|
|
|
1100
|
-
|
|
1123
|
+
#### isShakeMenuEnabled()
|
|
1101
1124
|
|
|
1102
1125
|
```typescript
|
|
1103
1126
|
isShakeMenuEnabled() => Promise<ShakeMenuEnabled>
|
|
@@ -1112,7 +1135,7 @@ Get the current state of the shake menu
|
|
|
1112
1135
|
--------------------
|
|
1113
1136
|
|
|
1114
1137
|
|
|
1115
|
-
|
|
1138
|
+
#### getAppId()
|
|
1116
1139
|
|
|
1117
1140
|
```typescript
|
|
1118
1141
|
getAppId() => Promise<GetAppIdRes>
|
|
@@ -1127,7 +1150,7 @@ Get the configured App ID
|
|
|
1127
1150
|
--------------------
|
|
1128
1151
|
|
|
1129
1152
|
|
|
1130
|
-
|
|
1153
|
+
#### setAppId(...)
|
|
1131
1154
|
|
|
1132
1155
|
```typescript
|
|
1133
1156
|
setAppId(options: SetAppIdOptions) => Promise<void>
|
|
@@ -1144,17 +1167,17 @@ Set the App ID for the app (requires allowModifyAppId to be true in config)
|
|
|
1144
1167
|
--------------------
|
|
1145
1168
|
|
|
1146
1169
|
|
|
1147
|
-
|
|
1170
|
+
#### Interfaces
|
|
1148
1171
|
|
|
1149
1172
|
|
|
1150
|
-
|
|
1173
|
+
##### AppReadyResult
|
|
1151
1174
|
|
|
1152
1175
|
| Prop | Type |
|
|
1153
1176
|
| ------------ | ------------------------------------------------- |
|
|
1154
1177
|
| **`bundle`** | <code><a href="#bundleinfo">BundleInfo</a></code> |
|
|
1155
1178
|
|
|
1156
1179
|
|
|
1157
|
-
|
|
1180
|
+
##### BundleInfo
|
|
1158
1181
|
|
|
1159
1182
|
| Prop | Type |
|
|
1160
1183
|
| ---------------- | ----------------------------------------------------- |
|
|
@@ -1165,28 +1188,28 @@ Set the App ID for the app (requires allowModifyAppId to be true in config)
|
|
|
1165
1188
|
| **`status`** | <code><a href="#bundlestatus">BundleStatus</a></code> |
|
|
1166
1189
|
|
|
1167
1190
|
|
|
1168
|
-
|
|
1191
|
+
##### UpdateUrl
|
|
1169
1192
|
|
|
1170
1193
|
| Prop | Type |
|
|
1171
1194
|
| --------- | ------------------- |
|
|
1172
1195
|
| **`url`** | <code>string</code> |
|
|
1173
1196
|
|
|
1174
1197
|
|
|
1175
|
-
|
|
1198
|
+
##### StatsUrl
|
|
1176
1199
|
|
|
1177
1200
|
| Prop | Type |
|
|
1178
1201
|
| --------- | ------------------- |
|
|
1179
1202
|
| **`url`** | <code>string</code> |
|
|
1180
1203
|
|
|
1181
1204
|
|
|
1182
|
-
|
|
1205
|
+
##### ChannelUrl
|
|
1183
1206
|
|
|
1184
1207
|
| Prop | Type |
|
|
1185
1208
|
| --------- | ------------------- |
|
|
1186
1209
|
| **`url`** | <code>string</code> |
|
|
1187
1210
|
|
|
1188
1211
|
|
|
1189
|
-
|
|
1212
|
+
##### DownloadOptions
|
|
1190
1213
|
|
|
1191
1214
|
This URL and versions are used to download the bundle from the server, If you use backend all information will be gived by the method getLatest.
|
|
1192
1215
|
If you don't use backend, you need to provide the URL and version of the bundle. Checksum and sessionKey are required if you encrypted the bundle with the CLI command encrypt, you should receive them as result of the command.
|
|
@@ -1200,7 +1223,7 @@ If you don't use backend, you need to provide the URL and version of the bundle.
|
|
|
1200
1223
|
| **`manifest`** | <code>ManifestEntry[]</code> | The manifest for multi-file downloads | <code>undefined</code> | 6.1.0 |
|
|
1201
1224
|
|
|
1202
1225
|
|
|
1203
|
-
|
|
1226
|
+
##### ManifestEntry
|
|
1204
1227
|
|
|
1205
1228
|
| Prop | Type |
|
|
1206
1229
|
| ------------------ | --------------------------- |
|
|
@@ -1209,35 +1232,35 @@ If you don't use backend, you need to provide the URL and version of the bundle.
|
|
|
1209
1232
|
| **`download_url`** | <code>string \| null</code> |
|
|
1210
1233
|
|
|
1211
1234
|
|
|
1212
|
-
|
|
1235
|
+
##### BundleId
|
|
1213
1236
|
|
|
1214
1237
|
| Prop | Type |
|
|
1215
1238
|
| -------- | ------------------- |
|
|
1216
1239
|
| **`id`** | <code>string</code> |
|
|
1217
1240
|
|
|
1218
1241
|
|
|
1219
|
-
|
|
1242
|
+
##### BundleListResult
|
|
1220
1243
|
|
|
1221
1244
|
| Prop | Type |
|
|
1222
1245
|
| ------------- | ------------------------- |
|
|
1223
1246
|
| **`bundles`** | <code>BundleInfo[]</code> |
|
|
1224
1247
|
|
|
1225
1248
|
|
|
1226
|
-
|
|
1249
|
+
##### ListOptions
|
|
1227
1250
|
|
|
1228
1251
|
| Prop | Type | Description | Default | Since |
|
|
1229
1252
|
| --------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ------ |
|
|
1230
1253
|
| **`raw`** | <code>boolean</code> | Whether to return the raw bundle list or the manifest. If true, the list will attempt to read the internal database instead of files on disk. | <code>false</code> | 6.14.0 |
|
|
1231
1254
|
|
|
1232
1255
|
|
|
1233
|
-
|
|
1256
|
+
##### ResetOptions
|
|
1234
1257
|
|
|
1235
1258
|
| Prop | Type |
|
|
1236
1259
|
| ---------------------- | -------------------- |
|
|
1237
1260
|
| **`toLastSuccessful`** | <code>boolean</code> |
|
|
1238
1261
|
|
|
1239
1262
|
|
|
1240
|
-
|
|
1263
|
+
##### CurrentBundleResult
|
|
1241
1264
|
|
|
1242
1265
|
| Prop | Type |
|
|
1243
1266
|
| ------------ | ------------------------------------------------- |
|
|
@@ -1245,14 +1268,14 @@ If you don't use backend, you need to provide the URL and version of the bundle.
|
|
|
1245
1268
|
| **`native`** | <code>string</code> |
|
|
1246
1269
|
|
|
1247
1270
|
|
|
1248
|
-
|
|
1271
|
+
##### MultiDelayConditions
|
|
1249
1272
|
|
|
1250
1273
|
| Prop | Type |
|
|
1251
1274
|
| --------------------- | ----------------------------- |
|
|
1252
1275
|
| **`delayConditions`** | <code>DelayCondition[]</code> |
|
|
1253
1276
|
|
|
1254
1277
|
|
|
1255
|
-
|
|
1278
|
+
##### DelayCondition
|
|
1256
1279
|
|
|
1257
1280
|
| Prop | Type | Description |
|
|
1258
1281
|
| ----------- | --------------------------------------------------------- | ---------------------------------------- |
|
|
@@ -1260,7 +1283,7 @@ If you don't use backend, you need to provide the URL and version of the bundle.
|
|
|
1260
1283
|
| **`value`** | <code>string</code> | |
|
|
1261
1284
|
|
|
1262
1285
|
|
|
1263
|
-
|
|
1286
|
+
##### LatestVersion
|
|
1264
1287
|
|
|
1265
1288
|
| Prop | Type | Description | Since |
|
|
1266
1289
|
| ---------------- | ---------------------------- | -------------------------------------------------------------------- | ------ |
|
|
@@ -1276,14 +1299,14 @@ If you don't use backend, you need to provide the URL and version of the bundle.
|
|
|
1276
1299
|
| **`manifest`** | <code>ManifestEntry[]</code> | | 6.1 |
|
|
1277
1300
|
|
|
1278
1301
|
|
|
1279
|
-
|
|
1302
|
+
##### GetLatestOptions
|
|
1280
1303
|
|
|
1281
1304
|
| Prop | Type | Description | Default | Since |
|
|
1282
1305
|
| ------------- | ------------------- | ----------------------------------------------------------------------------------------------- | ---------------------- | ----- |
|
|
1283
1306
|
| **`channel`** | <code>string</code> | The channel to get the latest version for The channel must allow 'self_assign' for this to work | <code>undefined</code> | 6.8.0 |
|
|
1284
1307
|
|
|
1285
1308
|
|
|
1286
|
-
|
|
1309
|
+
##### ChannelRes
|
|
1287
1310
|
|
|
1288
1311
|
| Prop | Type | Description | Since |
|
|
1289
1312
|
| ------------- | ------------------- | ----------------------------- | ----- |
|
|
@@ -1292,7 +1315,7 @@ If you don't use backend, you need to provide the URL and version of the bundle.
|
|
|
1292
1315
|
| **`message`** | <code>string</code> | | |
|
|
1293
1316
|
|
|
1294
1317
|
|
|
1295
|
-
|
|
1318
|
+
##### SetChannelOptions
|
|
1296
1319
|
|
|
1297
1320
|
| Prop | Type |
|
|
1298
1321
|
| ----------------------- | -------------------- |
|
|
@@ -1300,14 +1323,14 @@ If you don't use backend, you need to provide the URL and version of the bundle.
|
|
|
1300
1323
|
| **`triggerAutoUpdate`** | <code>boolean</code> |
|
|
1301
1324
|
|
|
1302
1325
|
|
|
1303
|
-
|
|
1326
|
+
##### UnsetChannelOptions
|
|
1304
1327
|
|
|
1305
1328
|
| Prop | Type |
|
|
1306
1329
|
| ----------------------- | -------------------- |
|
|
1307
1330
|
| **`triggerAutoUpdate`** | <code>boolean</code> |
|
|
1308
1331
|
|
|
1309
1332
|
|
|
1310
|
-
|
|
1333
|
+
##### GetChannelRes
|
|
1311
1334
|
|
|
1312
1335
|
| Prop | Type | Description | Since |
|
|
1313
1336
|
| -------------- | -------------------- | ----------------------------- | ----- |
|
|
@@ -1318,14 +1341,14 @@ If you don't use backend, you need to provide the URL and version of the bundle.
|
|
|
1318
1341
|
| **`allowSet`** | <code>boolean</code> | | |
|
|
1319
1342
|
|
|
1320
1343
|
|
|
1321
|
-
|
|
1344
|
+
##### ListChannelsResult
|
|
1322
1345
|
|
|
1323
1346
|
| Prop | Type | Description | Since |
|
|
1324
1347
|
| -------------- | -------------------------- | -------------------------- | ----- |
|
|
1325
1348
|
| **`channels`** | <code>ChannelInfo[]</code> | List of available channels | 7.5.0 |
|
|
1326
1349
|
|
|
1327
1350
|
|
|
1328
|
-
|
|
1351
|
+
##### ChannelInfo
|
|
1329
1352
|
|
|
1330
1353
|
| Prop | Type | Description | Since |
|
|
1331
1354
|
| -------------------- | -------------------- | ----------------------------------------------- | ----- |
|
|
@@ -1335,49 +1358,49 @@ If you don't use backend, you need to provide the URL and version of the bundle.
|
|
|
1335
1358
|
| **`allow_self_set`** | <code>boolean</code> | Whether devices can self-assign to this channel | 7.5.0 |
|
|
1336
1359
|
|
|
1337
1360
|
|
|
1338
|
-
|
|
1361
|
+
##### SetCustomIdOptions
|
|
1339
1362
|
|
|
1340
1363
|
| Prop | Type | Description |
|
|
1341
1364
|
| -------------- | ------------------- | --------------------------------------------------------------------------------------------- |
|
|
1342
1365
|
| **`customId`** | <code>string</code> | Custom identifier to associate with the device. Use an empty string to clear any saved value. |
|
|
1343
1366
|
|
|
1344
1367
|
|
|
1345
|
-
|
|
1368
|
+
##### BuiltinVersion
|
|
1346
1369
|
|
|
1347
1370
|
| Prop | Type |
|
|
1348
1371
|
| ------------- | ------------------- |
|
|
1349
1372
|
| **`version`** | <code>string</code> |
|
|
1350
1373
|
|
|
1351
1374
|
|
|
1352
|
-
|
|
1375
|
+
##### DeviceId
|
|
1353
1376
|
|
|
1354
1377
|
| Prop | Type |
|
|
1355
1378
|
| -------------- | ------------------- |
|
|
1356
1379
|
| **`deviceId`** | <code>string</code> |
|
|
1357
1380
|
|
|
1358
1381
|
|
|
1359
|
-
|
|
1382
|
+
##### PluginVersion
|
|
1360
1383
|
|
|
1361
1384
|
| Prop | Type |
|
|
1362
1385
|
| ------------- | ------------------- |
|
|
1363
1386
|
| **`version`** | <code>string</code> |
|
|
1364
1387
|
|
|
1365
1388
|
|
|
1366
|
-
|
|
1389
|
+
##### AutoUpdateEnabled
|
|
1367
1390
|
|
|
1368
1391
|
| Prop | Type |
|
|
1369
1392
|
| ------------- | -------------------- |
|
|
1370
1393
|
| **`enabled`** | <code>boolean</code> |
|
|
1371
1394
|
|
|
1372
1395
|
|
|
1373
|
-
|
|
1396
|
+
##### PluginListenerHandle
|
|
1374
1397
|
|
|
1375
1398
|
| Prop | Type |
|
|
1376
1399
|
| ------------ | ----------------------------------------- |
|
|
1377
1400
|
| **`remove`** | <code>() => Promise<void></code> |
|
|
1378
1401
|
|
|
1379
1402
|
|
|
1380
|
-
|
|
1403
|
+
##### DownloadEvent
|
|
1381
1404
|
|
|
1382
1405
|
| Prop | Type | Description | Since |
|
|
1383
1406
|
| ------------- | ------------------------------------------------- | ---------------------------------------------- | ----- |
|
|
@@ -1385,49 +1408,49 @@ If you don't use backend, you need to provide the URL and version of the bundle.
|
|
|
1385
1408
|
| **`bundle`** | <code><a href="#bundleinfo">BundleInfo</a></code> | | |
|
|
1386
1409
|
|
|
1387
1410
|
|
|
1388
|
-
|
|
1411
|
+
##### NoNeedEvent
|
|
1389
1412
|
|
|
1390
1413
|
| Prop | Type | Description | Since |
|
|
1391
1414
|
| ------------ | ------------------------------------------------- | ---------------------------------------------- | ----- |
|
|
1392
1415
|
| **`bundle`** | <code><a href="#bundleinfo">BundleInfo</a></code> | Current status of download, between 0 and 100. | 4.0.0 |
|
|
1393
1416
|
|
|
1394
1417
|
|
|
1395
|
-
|
|
1418
|
+
##### UpdateAvailableEvent
|
|
1396
1419
|
|
|
1397
1420
|
| Prop | Type | Description | Since |
|
|
1398
1421
|
| ------------ | ------------------------------------------------- | ---------------------------------------------- | ----- |
|
|
1399
1422
|
| **`bundle`** | <code><a href="#bundleinfo">BundleInfo</a></code> | Current status of download, between 0 and 100. | 4.0.0 |
|
|
1400
1423
|
|
|
1401
1424
|
|
|
1402
|
-
|
|
1425
|
+
##### DownloadCompleteEvent
|
|
1403
1426
|
|
|
1404
1427
|
| Prop | Type | Description | Since |
|
|
1405
1428
|
| ------------ | ------------------------------------------------- | ------------------------------------ | ----- |
|
|
1406
1429
|
| **`bundle`** | <code><a href="#bundleinfo">BundleInfo</a></code> | Emit when a new update is available. | 4.0.0 |
|
|
1407
1430
|
|
|
1408
1431
|
|
|
1409
|
-
|
|
1432
|
+
##### MajorAvailableEvent
|
|
1410
1433
|
|
|
1411
1434
|
| Prop | Type | Description | Since |
|
|
1412
1435
|
| ------------- | ------------------- | ----------------------------------------- | ----- |
|
|
1413
1436
|
| **`version`** | <code>string</code> | Emit when a breaking update is available. | 4.0.0 |
|
|
1414
1437
|
|
|
1415
1438
|
|
|
1416
|
-
|
|
1439
|
+
##### UpdateFailedEvent
|
|
1417
1440
|
|
|
1418
1441
|
| Prop | Type | Description | Since |
|
|
1419
1442
|
| ------------ | ------------------------------------------------- | ------------------------------------- | ----- |
|
|
1420
1443
|
| **`bundle`** | <code><a href="#bundleinfo">BundleInfo</a></code> | Emit when a update failed to install. | 4.0.0 |
|
|
1421
1444
|
|
|
1422
1445
|
|
|
1423
|
-
|
|
1446
|
+
##### DownloadFailedEvent
|
|
1424
1447
|
|
|
1425
1448
|
| Prop | Type | Description | Since |
|
|
1426
1449
|
| ------------- | ------------------- | -------------------------- | ----- |
|
|
1427
1450
|
| **`version`** | <code>string</code> | Emit when a download fail. | 4.0.0 |
|
|
1428
1451
|
|
|
1429
1452
|
|
|
1430
|
-
|
|
1453
|
+
##### AppReadyEvent
|
|
1431
1454
|
|
|
1432
1455
|
| Prop | Type | Description | Since |
|
|
1433
1456
|
| ------------ | ------------------------------------------------- | ------------------------------------- | ----- |
|
|
@@ -1435,45 +1458,45 @@ If you don't use backend, you need to provide the URL and version of the bundle.
|
|
|
1435
1458
|
| **`status`** | <code>string</code> | | |
|
|
1436
1459
|
|
|
1437
1460
|
|
|
1438
|
-
|
|
1461
|
+
##### AutoUpdateAvailable
|
|
1439
1462
|
|
|
1440
1463
|
| Prop | Type |
|
|
1441
1464
|
| --------------- | -------------------- |
|
|
1442
1465
|
| **`available`** | <code>boolean</code> |
|
|
1443
1466
|
|
|
1444
1467
|
|
|
1445
|
-
|
|
1468
|
+
##### SetShakeMenuOptions
|
|
1446
1469
|
|
|
1447
1470
|
| Prop | Type |
|
|
1448
1471
|
| ------------- | -------------------- |
|
|
1449
1472
|
| **`enabled`** | <code>boolean</code> |
|
|
1450
1473
|
|
|
1451
1474
|
|
|
1452
|
-
|
|
1475
|
+
##### ShakeMenuEnabled
|
|
1453
1476
|
|
|
1454
1477
|
| Prop | Type |
|
|
1455
1478
|
| ------------- | -------------------- |
|
|
1456
1479
|
| **`enabled`** | <code>boolean</code> |
|
|
1457
1480
|
|
|
1458
1481
|
|
|
1459
|
-
|
|
1482
|
+
##### GetAppIdRes
|
|
1460
1483
|
|
|
1461
1484
|
| Prop | Type |
|
|
1462
1485
|
| ----------- | ------------------- |
|
|
1463
1486
|
| **`appId`** | <code>string</code> |
|
|
1464
1487
|
|
|
1465
1488
|
|
|
1466
|
-
|
|
1489
|
+
##### SetAppIdOptions
|
|
1467
1490
|
|
|
1468
1491
|
| Prop | Type |
|
|
1469
1492
|
| ----------- | ------------------- |
|
|
1470
1493
|
| **`appId`** | <code>string</code> |
|
|
1471
1494
|
|
|
1472
1495
|
|
|
1473
|
-
|
|
1496
|
+
#### Type Aliases
|
|
1474
1497
|
|
|
1475
1498
|
|
|
1476
|
-
|
|
1499
|
+
##### BundleStatus
|
|
1477
1500
|
|
|
1478
1501
|
pending: The bundle is pending to be **SET** as the next bundle.
|
|
1479
1502
|
downloading: The bundle is being downloaded.
|
|
@@ -1483,12 +1506,12 @@ error: The bundle has failed to download.
|
|
|
1483
1506
|
<code>'success' | 'error' | 'pending' | 'downloading'</code>
|
|
1484
1507
|
|
|
1485
1508
|
|
|
1486
|
-
|
|
1509
|
+
##### DelayUntilNext
|
|
1487
1510
|
|
|
1488
1511
|
<code>'background' | 'kill' | 'nativeVersion' | 'date'</code>
|
|
1489
1512
|
|
|
1490
1513
|
|
|
1491
|
-
|
|
1514
|
+
##### BreakingAvailableEvent
|
|
1492
1515
|
|
|
1493
1516
|
Payload emitted by {@link CapacitorUpdaterPlugin.addListener} with `breakingAvailable`.
|
|
1494
1517
|
|