Skip to content

@capgo/capacitor-updater

Live update for capacitor apps.

Live update for capacitor apps.

  • notifyAppReady - Notify the native layer that JavaScript initialized successfully.
  • setUpdateUrl - Set the update URL for the app dynamically at runtime.
  • setStatsUrl - Set the statistics URL for the app dynamically at runtime.
  • setChannelUrl - Set the channel URL for the app dynamically at runtime.
MethodDescription
notifyAppReadyNotify the native layer that JavaScript initialized successfully.
setUpdateUrlSet the update URL for the app dynamically at runtime.
setStatsUrlSet the statistics URL for the app dynamically at runtime.
setChannelUrlSet the channel URL for the app dynamically at runtime.
downloadDownload a new bundle from the provided URL for later installation.
nextSet the next bundle to be activated when the app backgrounds or restarts.
setSet the current bundle and immediately reloads the app.
deleteDelete a bundle from local storage to free up disk space.
setBundleErrorManually mark a bundle as failed/errored in manual update mode.
listGet all locally downloaded bundles stored in your app.
resetReset the app to a known good bundle.
currentGet information about the currently active bundle.
reloadManually reload the app to apply a pending update.
setMultiDelayConfigure conditions that must be met before a pending update is applied.
cancelDelayCancel all delay conditions and apply the pending update immediately.
getLatestCheck the update server for the latest available bundle version.
setChannelAssign this device to a specific update channel at runtime.
unsetChannelRemove the device’s channel assignment and return to the default channel.
getChannelGet the current channel assigned to this device.
listChannelsGet a list of all channels available for this device to self-assign to.
setCustomIdSet a custom identifier for this device.
getBuiltinVersionGet the builtin bundle version (the original version shipped with your native app).
getDeviceIdGet the unique, privacy-friendly identifier for this device.
getPluginVersionGet the version of the Capacitor Updater plugin installed in your app.
isAutoUpdateEnabledCheck if automatic updates are currently enabled.
removeAllListenersRemove all event listeners registered for this plugin.
addListenerListen for bundle download event in the App. Fires once a download has started, during downloading and when finished. This will return you all download percent during the download.
addListenerListen for no need to update event, useful when you want force check every time the app is launched.
addListenerListen for available update event, useful when you want to force check every time the app is launched.
addListenerListen for downloadComplete events.
addListenerListen for breaking update events when the backend flags an update as incompatible with the current app. Emits the same payload as the legacy majorAvailable listener.
addListenerListen for Major update event in the App, let you know when major update is blocked by setting disableAutoUpdateBreaking.
addListenerListen for update fail event in the App, let you know when update has fail to install at next app start.
addListenerListen for set event in the App, let you know when a bundle has been applied successfully. This event is retained natively until JavaScript consumes it, so if the app reloads before your listener is attached, the last pending set event is delivered once the listener subscribes.
addListenerListen for set next event in the App, let you know when a bundle is queued as the next bundle to install.
addListenerListen for download fail event in the App, let you know when a bundle download has failed.
addListenerListen for reload event in the App, let you know when reload has happened.
addListenerListen for app ready event in the App, let you know when app is ready to use. This event is retained natively until JavaScript consumes it, so it can still be delivered after a reload even if the listener is attached later in app startup.
addListenerListen for channel private event, fired when attempting to set a channel that doesn’t allow device self-assignment.
addListenerListen for flexible update state changes on Android.
isAutoUpdateAvailableCheck if the auto-update feature is available (not disabled by custom server configuration).
getNextBundleGet information about the bundle queued to be activated on next reload.
getFailedUpdateRetrieve information about the most recent bundle that failed to load.
setShakeMenuEnable or disable the shake gesture menu for debugging and testing.
isShakeMenuEnabledCheck if the shake gesture debug menu is currently enabled.
setShakeChannelSelectorEnable or disable the shake channel selector at runtime.
isShakeChannelSelectorEnabledCheck if the shake channel selector is currently enabled.
getAppIdGet the currently configured App ID used for update server communication.
setAppIdDynamically change the App ID used for update server communication.
getAppUpdateInfoGet information about the app’s availability in the App Store or Play Store.
openAppStoreOpen the app’s page in the App Store or Play Store.
performImmediateUpdatePerform an immediate in-app update on Android.
startFlexibleUpdateStart a flexible in-app update on Android.
completeFlexibleUpdateComplete a flexible in-app update on Android.

This reference is synced from src/definitions.ts in capacitor-updater.