Settings
Konten ini belum tersedia dalam bahasa Anda.
To have more fine-grained control over the update system, you can configure it with these settings:
appReadyTimeout
Configure the number of milliseconds the native plugin should wait before considering an update ‘failed’.
Only available for Android and iOS.
Default: 10000
(10 seconds)
{ "plugins": { "CapacitorUpdater": { "appReadyTimeout": 1000 } }}
responseTimeout
Configure the number of milliseconds the native plugin should wait before considering API timeout.
Only available for Android and iOS.
Default: 20
(20 seconds)
{ "plugins": { "CapacitorUpdater": { "responseTimeout": 10 // (10 seconds) } }}
autoDeleteFailed
Configure whether the plugin should automatically delete failed bundles.
Only available for Android and iOS.
Default: true
{ "plugins": { "CapacitorUpdater": { "autoDeleteFailed": false } }}
autoDeletePrevious
Configure whether the plugin should automatically delete previous bundles after a successful update.
Only available for Android and iOS.
Default: true
{ "plugins": { "CapacitorUpdater": { "autoDeletePrevious": false } }}
autoUpdate
Configure whether the plugin should use Auto Update via an update server.
Only available for Android and iOS.
Default: true
{ "plugins": { "CapacitorUpdater": { "autoUpdate": false } }}
updateUrl
Configure the URL / endpoint to which update checks are sent.
Only available for Android and iOS.
Default: https://plugin.capgo.app/updates
{ "plugins": { "CapacitorUpdater": { "updateUrl": "https://example.com/api/auto_update" } }}
statsUrl
Configure the URL / endpoint to which update statistics are sent.
Only available for Android and iOS. Set to "" to disable stats reporting.
Default: https://plugin.capgo.app/stats
{ "plugins": { "CapacitorUpdater": { "statsUrl": "https://example.com/api/stats" } }}
publicKey
Configure the public key for end to end live update encryption Version 2.
Only available for Android and iOS.
Default: undefined
{ "plugins": { "CapacitorUpdater": { "publicKey": "YOUR_PUBLIC_KEY" } }}
directUpdate
Configure when the plugin should direct install updates. Only for autoUpdate mode. Works well for apps less than 10MB and with uploads done using —partial flag. Zip or apps more than 10MB will be relatively slow for users to update.
Options:
false
: Never do direct updates (default behavior)'atInstall'
: Direct update only when app is installed/updated from store, otherwise use normal background update'always'
: Always do direct updates immediately when availabletrue
: (deprecated) Same as “always” for backward compatibility
Only available for Android and iOS.
Default: false
{ "plugins": { "CapacitorUpdater": { "autoUpdate": true, "directUpdate": "atInstall" } }}
resetWhenUpdate
Automatically delete previous downloaded bundles when a newer native app bundle is installed to the device.
Only available for Android and iOS.
Default: true
{ "plugins": { "CapacitorUpdater": { "resetWhenUpdate": false } }}
defaultChannel
Set the default channel for the app in the config. Case sensitive. This setting will override the default channel set in the cloud, but will still respect overrides made in the cloud.
Only available for Android and iOS.
Default: undefined
{ "plugins": { "CapacitorUpdater": { "defaultChannel": "production" } }}
appId
Configure the app id for the app in the config.
Only available for Android and iOS.
Default: undefined
{ "plugins": { "CapacitorUpdater": { "appId": "com.example.app" } }}
version
Configure the current version of the app. This will be used for the first update request. If not set, the plugin will get the version from the native code.
Only available for Android and iOS.
Default: undefined
{ "plugins": { "CapacitorUpdater": { "version": "1.0.0" } }}
channelUrl
Configure the URL / endpoint for channel operations.
Only available for Android and iOS.
Default: https://plugin.capgo.app/channel_self
{ "plugins": { "CapacitorUpdater": { "channelUrl": "https://example.com/api/channel" } }}
autoSplashscreen
Automatically handle splashscreen hiding when using directUpdate. When enabled, the plugin will automatically hide the splashscreen after updates are applied or when no update is needed. This removes the need to manually listen for appReady events and call SplashScreen.hide(). Only works when directUpdate is set to “atInstall”, “always”, or true. Requires the @capacitor/splash-screen plugin to be installed and configured with launchAutoHide: false. Requires autoUpdate and directUpdate to be enabled.
Only available for Android and iOS.
Default: false
{ "plugins": { "CapacitorUpdater": { "autoUpdate": true, "directUpdate": "atInstall", "autoSplashscreen": true } }}
periodCheckDelay
Configure the delay period for period update check. The unit is in seconds. Cannot be less than 600 seconds (10 minutes).
Only available for Android and iOS.
Default: 600
(10 minutes)
{ "plugins": { "CapacitorUpdater": { "periodCheckDelay": 600 // (10 minutes) } }}
allowModifyUrl
Allow the plugin to modify the updateUrl, statsUrl and channelUrl dynamically from the JavaScript side.
Only available for Android and iOS.
Default: false
{ "plugins": { "CapacitorUpdater": { "allowModifyUrl": true } }}
keepUrlPathAfterReload
Configure the plugin to keep the URL path after a reload.
Only available for Android and iOS.
Default: false
{ "plugins": { "CapacitorUpdater": { "keepUrlPathAfterReload": true } }}
disableJSLogging
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.
Only available for Android and iOS.
Default: false
{ "plugins": { "CapacitorUpdater": { "disableJSLogging": true } }}
shakeMenu
Enable shake gesture to show update menu for debugging/testing purposes.
Only available for Android and iOS.
Default: false
{ "plugins": { "CapacitorUpdater": { "shakeMenu": true } }}
Development Settings
localHost
Configure the CLI to use a local server for testing or self-hosted update server.
Default: undefined
{ "plugins": { "CapacitorUpdater": { "localHost": "http://localhost:5173" } }}
localWebHost
Configure the CLI to use a local server for testing or self-hosted update server.
Default: undefined
{ "plugins": { "CapacitorUpdater": { "localWebHost": "http://localhost:5173" } }}
localSupa
Configure the CLI to use a local server for testing or self-hosted update server.
Default: undefined
{ "plugins": { "CapacitorUpdater": { "localSupa": "http://localhost:54321" } }}
localSupaAnon
Configure the CLI to use a local server for testing.
Default: undefined
{ "plugins": { "CapacitorUpdater": { "localSupaAnon": "YOUR_LOCAL_ANON_KEY" } }}
localApi
Configure the CLI to use a local api for testing.
Default: undefined
{ "plugins": { "CapacitorUpdater": { "localApi": "http://localhost:54321/functions/v1" } }}
localApiFiles
Configure the CLI to use a local file api for testing.
Default: undefined
{ "plugins": { "CapacitorUpdater": { "localApiFiles": "http://localhost:54321/functions/v1/files" } }}