Skip to content

Commit 4305044

Browse files
committed
1 parent 2f3cb5d commit 4305044

File tree

1 file changed

+61
-0
lines changed
  • src/content/docs/docs/plugin

1 file changed

+61
-0
lines changed

src/content/docs/docs/plugin/api.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ CapacitorUpdater can be configured with these options:
4949
| **`disableJSLogging`** | `boolean` | 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 | `false` | 7.3.0 |
5050
| **`osLogging`** | `boolean` | 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). | `true` | 8.42.0 |
5151
| **`shakeMenu`** | `boolean` | Enable shake gesture to show update menu for debugging/testing purposes | `false` | 7.5.0 |
52+
| **`allowShakeChannelSelector`** | `boolean` | Enable the shake gesture to show a channel selector menu for switching between update channels. When enabled AND `shakeMenu` is true, the shake gesture shows a channel selector instead of the default debug menu (Go Home/Reload/Close). After selecting a channel, the app automatically checks for updates and downloads if available. Only works if channels have `allow_self_set` enabled on the backend. Only available for Android and iOS. | `false` | 8.43.0 |
5253

5354

5455
</docgen-config>
@@ -101,6 +102,8 @@ CapacitorUpdater can be configured with these options:
101102
- [`getFailedUpdate`](#getfailedupdate)
102103
- [`setShakeMenu`](#setshakemenu)
103104
- [`isShakeMenuEnabled`](#isshakemenuenabled)
105+
- [`setShakeChannelSelector`](#setshakechannelselector)
106+
- [`isShakeChannelSelectorEnabled`](#isshakechannelselectorenabled)
104107
- [`getAppId`](#getappid)
105108
- [`setAppId`](#setappid)
106109
- [`getAppUpdateInfo`](#getappupdateinfo)
@@ -1598,6 +1601,64 @@ Use this to:
15981601
--------------------
15991602

16001603

1604+
### setShakeChannelSelector
1605+
1606+
```typescript
1607+
setShakeChannelSelector(options: SetShakeChannelSelectorOptions) => Promise<void>
1608+
```
1609+
1610+
Enable or disable the shake channel selector at runtime.
1611+
1612+
When enabled AND shakeMenu is true, shaking the device shows a channel
1613+
selector instead of the debug menu. This allows users to switch between
1614+
update channels by shaking their device.
1615+
1616+
After selecting a channel, the app automatically checks for updates
1617+
and downloads if available.
1618+
1619+
Can also be configured via {@link PluginsConfig.CapacitorUpdater.allowShakeChannelSelector}.
1620+
1621+
**Parameters**
1622+
1623+
| Name | Type | Description |
1624+
| --- | --- | --- |
1625+
| `options` | `SetShakeChannelSelectorOptions` | |
1626+
1627+
**Returns**
1628+
1629+
`Promise<void>` — Resolves when the setting is applied.
1630+
1631+
**Since:** 8.43.0
1632+
1633+
**Throws:** {Error} If the operation fails.
1634+
1635+
1636+
--------------------
1637+
1638+
1639+
### isShakeChannelSelectorEnabled
1640+
1641+
```typescript
1642+
isShakeChannelSelectorEnabled() => Promise<ShakeChannelSelectorEnabled>
1643+
```
1644+
1645+
Check if the shake channel selector is currently enabled.
1646+
1647+
Returns the current state of the shake channel selector feature that can be toggled via
1648+
{@link setShakeChannelSelector} or configured via {@link PluginsConfig.CapacitorUpdater.allowShakeChannelSelector}.
1649+
1650+
**Returns**
1651+
1652+
`Promise<ShakeChannelSelectorEnabled>` — Object with `enabled: true` or `enabled: false`.
1653+
1654+
**Since:** 8.43.0
1655+
1656+
**Throws:** {Error} If the operation fails.
1657+
1658+
1659+
--------------------
1660+
1661+
16011662
### getAppId
16021663

16031664
```typescript

0 commit comments

Comments
 (0)