@capgo/capacitor-updater 8.47.5 → 8.47.7
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 +13 -20
- package/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdaterPlugin.java +380 -92
- package/android/src/main/java/ee/forgr/capacitor_updater/CapgoUpdater.java +279 -259
- package/android/src/main/java/ee/forgr/capacitor_updater/DownloadService.java +23 -26
- package/android/src/main/java/ee/forgr/capacitor_updater/ShakeMenu.java +111 -62
- package/dist/docs.json +5 -5
- package/dist/esm/definitions.d.ts +16 -24
- package/dist/esm/definitions.js.map +1 -1
- package/ios/Sources/CapacitorUpdaterPlugin/CapacitorUpdaterPlugin.swift +343 -46
- package/ios/Sources/CapacitorUpdaterPlugin/CapgoUpdater.swift +1 -1
- package/ios/Sources/CapacitorUpdaterPlugin/InternalUtils.swift +1 -1
- package/ios/Sources/CapacitorUpdaterPlugin/ShakeMenu.swift +25 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -323,8 +323,8 @@ CapacitorUpdater can be configured with these options:
|
|
|
323
323
|
| **`keepUrlPathAfterReload`** | <code>boolean</code> | Configure the plugin to keep the URL path after a reload. WARNING: When a reload is triggered, 'window.history' will be cleared. | <code>false</code> | 6.8.0 |
|
|
324
324
|
| **`disableJSLogging`** | <code>boolean</code> | Disable the JavaScript logging of the plugin. if true, the plugin will not log to the JavaScript console. only the native log will be done | <code>false</code> | 7.3.0 |
|
|
325
325
|
| **`osLogging`** | <code>boolean</code> | Enable OS-level logging. When enabled, logs are written to the system log which can be inspected in production builds. - **iOS**: Uses os_log instead of Swift.print, logs accessible via Console.app or Instruments - **Android**: Logs to Logcat (android.util.Log) When set to false, system logging is disabled on both platforms (only JavaScript console logging will occur if enabled). This is useful for debugging production apps (App Store/TestFlight builds on iOS, or production APKs on Android). | <code>true</code> | 8.42.0 |
|
|
326
|
-
| **`shakeMenu`** | <code>boolean</code> | Enable shake gesture
|
|
327
|
-
| **`allowShakeChannelSelector`** | <code>boolean</code> | Enable the shake gesture to show a channel selector menu for switching between update channels.
|
|
326
|
+
| **`shakeMenu`** | <code>boolean</code> | Enable the shake gesture while a preview session is active. Outside preview sessions this preview menu is ignored, unless {@link PluginsConfig.CapacitorUpdater.allowShakeChannelSelector} is enabled. | <code>false</code> | 7.5.0 |
|
|
327
|
+
| **`allowShakeChannelSelector`** | <code>boolean</code> | Enable the shake gesture to show a channel selector menu for switching between update channels. If {@link PluginsConfig.CapacitorUpdater.shakeMenu} is also enabled while a preview session is active, the shake menu includes both preview actions and channel switching. Only available for Android and iOS. | <code>false</code> | 8.43.0 |
|
|
328
328
|
|
|
329
329
|
### Examples
|
|
330
330
|
|
|
@@ -1818,19 +1818,15 @@ Use this to:
|
|
|
1818
1818
|
setShakeMenu(options: SetShakeMenuOptions) => Promise<void>
|
|
1819
1819
|
```
|
|
1820
1820
|
|
|
1821
|
-
Enable or disable the shake gesture menu
|
|
1821
|
+
Enable or disable the shake gesture menu.
|
|
1822
1822
|
|
|
1823
|
-
|
|
1824
|
-
-
|
|
1825
|
-
-
|
|
1826
|
-
-
|
|
1827
|
-
- Update status
|
|
1823
|
+
During preview sessions, users can shake their device to:
|
|
1824
|
+
- Reload the current preview
|
|
1825
|
+
- Leave the test app and return to the fallback bundle
|
|
1826
|
+
- Switch update channel, when {@link PluginsConfig.CapacitorUpdater.allowShakeChannelSelector} is also enabled
|
|
1828
1827
|
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
- Debug update flows
|
|
1832
|
-
- Switch between production and test bundles
|
|
1833
|
-
- Verify bundle installations
|
|
1828
|
+
Outside preview sessions, this preview menu is ignored. The channel selector can still be
|
|
1829
|
+
shown outside preview sessions when {@link PluginsConfig.CapacitorUpdater.allowShakeChannelSelector} is enabled.
|
|
1834
1830
|
|
|
1835
1831
|
**Important:** Disable this in production builds or only enable for internal testers.
|
|
1836
1832
|
|
|
@@ -1876,12 +1872,9 @@ setShakeChannelSelector(options: SetShakeChannelSelectorOptions) => Promise<void
|
|
|
1876
1872
|
|
|
1877
1873
|
Enable or disable the shake channel selector at runtime.
|
|
1878
1874
|
|
|
1879
|
-
When enabled
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
After selecting a channel, the app automatically checks for updates
|
|
1884
|
-
and downloads if available.
|
|
1875
|
+
When enabled, shaking the device can show a channel selector, including outside preview sessions.
|
|
1876
|
+
If {@link setShakeMenu} is also enabled while a preview session is active, the shake menu includes
|
|
1877
|
+
both preview actions and channel switching.
|
|
1885
1878
|
|
|
1886
1879
|
Can also be configured via {@link PluginsConfig.CapacitorUpdater.allowShakeChannelSelector}.
|
|
1887
1880
|
|
|
@@ -2386,7 +2379,7 @@ Result returned after requesting an immediate native auto-update check.
|
|
|
2386
2379
|
|
|
2387
2380
|
| Prop | Type | Description | Since |
|
|
2388
2381
|
| -------------------- | -------------------- | ----------------------------------------------- | ----- |
|
|
2389
|
-
| **`id`** | <code>
|
|
2382
|
+
| **`id`** | <code>number</code> | The channel ID | 7.5.0 |
|
|
2390
2383
|
| **`name`** | <code>string</code> | The channel name | 7.5.0 |
|
|
2391
2384
|
| **`public`** | <code>boolean</code> | Whether this is a public channel | 7.5.0 |
|
|
2392
2385
|
| **`allow_self_set`** | <code>boolean</code> | Whether devices can self-assign to this channel | 7.5.0 |
|