You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/live-update/README.md
+37-1Lines changed: 37 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,21 @@ npx cap sync
51
51
52
52
### Android
53
53
54
+
#### Channel
55
+
56
+
If you are using [Versioned Channels](https://capawesome.io/cloud/live-updates/guides/best-practices/#versioned-channels), you can set a default channel directly in your native project by adding a string resource.
57
+
This allows you to tie the channel to the version code at build time.
58
+
59
+
Add the following to your app's `build.gradle` file:
If needed, you can define the following project variable in your app’s `variables.gradle` file to change the default version of the dependency:
@@ -62,6 +77,18 @@ This can be useful if you encounter dependency conflicts with other plugins in y
62
77
63
78
### iOS
64
79
80
+
#### Channel
81
+
82
+
If you are using [Versioned Channels](https://capawesome.io/cloud/live-updates/guides/best-practices/#versioned-channels), you can set a default channel directly in your native project by adding a key to your `Info.plist` file.
83
+
This allows you to tie the channel to the build version at build time.
Add the `NSPrivacyAccessedAPICategoryUserDefaults` dictionary key to your [Privacy Manifest](https://capacitorjs.com/docs/ios/privacy-manifest) (usually `ios/App/PrivacyInfo.xcprivacy`):
@@ -100,7 +127,7 @@ We recommend to declare [`CA92.1`](https://developer.apple.com/documentation/bun
100
127
|**`autoBlockRolledBackBundles`**| <code>boolean</code> | Whether or not to automatically block bundles that have been rolled back. When enabled, the plugin will automatically block bundles that caused a rollback (up to 100 bundles). When the limit is reached, the oldest blocked bundle is unblocked. Blocked bundles will be skipped in future sync operations. **Attention**: This option has no effect if `readyTimeout` is set to `0`. Only available on Android and iOS. | <code>false</code> | 7.3.0 |
101
128
|**`autoDeleteBundles`**| <code>boolean</code> | Whether or not to automatically delete unused bundles. When enabled, the plugin will automatically delete unused bundles after calling `ready()`. | <code>false</code> | 5.0.0 |
102
129
|**`autoUpdateStrategy`**| <code>'none' \| 'background'</code> | The auto-update strategy for live updates. - `none`: Live updates will not be applied automatically. - `background`: Live updates will be automatically downloaded and applied in the background at app startup and when the app resumes (if the last check was more than 15 minutes ago). Only available on Android and iOS. | <code>'none'</code> | 7.3.0 |
103
-
|**`defaultChannel`**| <code>string</code> | The default channel of the app. || 6.3.0 |
130
+
|**`defaultChannel`**| <code>string</code> | The default channel of the app. This can be overridden by `setChannel()` or the `channel` parameter of `sync()`. It takes priority over the native channel configuration (`CapawesomeLiveUpdateDefaultChannel` in `Info.plist` on iOS or `capawesome_live_update_default_channel` in `strings.xml` on Android).|| 6.3.0 |
104
131
|**`httpTimeout`**| <code>number</code> | The timeout in milliseconds for HTTP requests. | <code>60000</code> | 6.4.0 |
105
132
|**`publicKey`**| <code>string</code> | The public key to verify the integrity of the bundle. The public key must be a PEM-encoded RSA public key. || 6.1.0 |
106
133
|**`readyTimeout`**| <code>number</code> | The timeout in milliseconds to wait for the app to be ready before resetting to the default bundle. It is strongly **recommended** to configure this option (e.g. `10000` ms) so that the plugin can roll back to the default bundle in case of problems. If configured, the plugin will wait for the app to call the `ready()` method before resetting to the default bundle. Set to `0` to disable the timeout. | <code>0</code> | 5.0.0 |
0 commit comments