Methods
All available method of the plugin
List of all available methods of the plugin, auto-update on each commit to the main branch of the plugin.
notifyAppReady() => Promise<BundleInfo>
Notify Capacitor Updater that the current bundle is working (a rollback will occur of this method is not called on every app launch)
download(options: { url: string; version: string; sessionKey?: string; checksum?: string; }) => Promise<BundleInfo>
Download a new bundle from the provided URL, it should be a zip file, with files inside or with a unique id inside with all your files
Param | Type |
---|---|
options | { url: string; version: string; sessionKey?: string; checksum?: string; } |
next(options: { id: string; }) => Promise<BundleInfo>
Set the next bundle to be used when the app is reloaded.
Param | Type |
---|---|
options | { id: string; } |
set(options: { id: string; }) => Promise<void>
Set the current bundle and immediately reloads the app.
Param | Type |
---|---|
options | { id: string; } |
delete(options: { id: string; }) => Promise<void>
Delete bundle in storage
Param | Type |
---|---|
options | { id: string; } |
list() => Promise<{ bundles: BundleInfo[]; }>
Get all available bundles
Returns:
Promise<{ bundles: BundleInfo[]; }>
reset(options?: { toLastSuccessful?: boolean | undefined; } | undefined) => Promise<void>
Set the
builtin
bundle (the one sent to Apple store / Google play store ) as current bundleParam | Type |
---|---|
options | { toLastSuccessful?: boolean; } |
current() => Promise<{ bundle: BundleInfo; native: string; }>
Get the current bundle, if none are set it returns
builtin
, currentNative is the original bundle installed on the device
reload() => Promise<void>
Reload the view
setMultiDelay(options: { delayConditions: DelayCondition[]; }) => Promise<void>
Param | Type | Description |
---|---|---|
options | { delayConditions: DelayCondition[]; } |
Since: 4.3.0
setDelay(options: DelayCondition) => Promise<void>
Param | Type | Description |
---|---|---|
options |
Since: 4.0.0
cancelDelay() => Promise<void>
Cancel delay to updates as usual
Since: 4.0.0
getLatest() => Promise<latestVersion>
Get Latest bundle available from update Url
Since: 4.0.0
setChannel(options: SetChannelOptions) => Promise<channelRes>
Set Channel for this device
Param | Type | Description |
---|---|---|
options |
Since: 4.7.0
getChannel() => Promise<getChannelRes>
get Channel for this device
Since: 4.8.0
setCustomId(options: SetCustomIdOptions) => Promise<void>
Set Channel for this device
Param | Type | Description |
---|---|---|
options |
Since: 4.9.0
addListener(eventName: "download", listenerFunc: DownloadChangeListener) => Promise<PluginListenerHandle> & PluginListenerHandle
Listen for download event in the App, let you know when the download is started, loading and finished
Param | Type |
---|---|
eventName | 'download' |
listenerFunc |
Since: 2.0.11
addListener(eventName: "noNeedUpdate", listenerFunc: NoNeedListener) => Promise<PluginListenerHandle> & PluginListenerHandle
Listen for no need to update event, usefull when you want force check every time the app is launched
Param | Type |
---|---|
eventName | 'noNeedUpdate' |
listenerFunc |
Since: 4.0.0
addListener(eventName: "updateAvailable", listenerFunc: UpdateAvailabledListener) => Promise<PluginListenerHandle> & PluginListenerHandle
Listen for availbale update event, usefull when you want to force check every time the app is launched
Param | Type |
---|---|
eventName | 'updateAvailable' |
listenerFunc |
Since: 4.0.0
addListener(eventName: "downloadComplete", listenerFunc: DownloadCompleteListener) => Promise<PluginListenerHandle> & PluginListenerHandle
Listen for download event in the App, let you know when the download is started, loading and finished
Param | Type |
---|---|
eventName | 'downloadComplete' |
listenerFunc |
Since: 4.0.0
addListener(eventName: "majorAvailable", listenerFunc: MajorAvailableListener) => Promise<PluginListenerHandle> & PluginListenerHandle
Listen for Major update event in the App, let you know when major update is blocked by setting disableAutoUpdateBreaking
Param | Type |
---|---|
eventName | 'majorAvailable' |
listenerFunc |
Since: 2.3.0
addListener(eventName: "updateFailed", listenerFunc: UpdateFailedListener) => Promise<PluginListenerHandle> & PluginListenerHandle
Listen for update fail event in the App, let you know when update has fail to install at next app start
Param | Type |
---|---|
eventName | 'updateFailed' |
listenerFunc |
Since: 2.3.0
addListener(eventName: "downloadFailed", listenerFunc: DownloadFailedListener) => Promise<PluginListenerHandle> & PluginListenerHandle
Listen for download fail event in the App, let you know when download has fail finished
Param | Type |
---|---|
eventName | 'downloadFailed' |
listenerFunc |
Since: 4.0.0
addListener(eventName: "appReloaded", listenerFunc: AppReloadedListener) => Promise<PluginListenerHandle> & PluginListenerHandle
Listen for download fail event in the App, let you know when download has fail finished
Param | Type |
---|---|
eventName | 'appReloaded' |
listenerFunc |
Since: 4.3.0
getDeviceId() => Promise<{ deviceId: string; }>
Get unique ID used to identify device (sent to auto update server)
Returns:
Promise<{ deviceId: string; }>
getPluginVersion() => Promise<{ version: string; }>
Get the native Capacitor Updater plugin version (sent to auto update server)
Returns:
Promise<{ version: string; }>
isAutoUpdateEnabled() => Promise<{ enabled: boolean; }>
Get the state of auto update config. This will return
false
in manual mode.Returns:
Promise<{ enabled: boolean; }>
Prop | Type |
---|---|
id | string |
version | string |
downloaded | string |
checksum | string |
status |
Prop | Type | Description |
---|---|---|
kind | Set up delay conditions in setMultiDelay | |
value | string | |
Prop | Type | Description | Since |
---|---|---|---|
version | string | Res of getLatest method | 4.0.0 |
major | boolean | | |
message | string | | |
error | string | | |
old | string | | |
url | string | | |
Prop | Type | Description | Since |
---|---|---|---|
status | string | Current status of set channel | 4.7.0 |
error | any | | |
message | any | | |
Prop | Type |
---|---|
channel | string |
Prop | Type | Description | Since |
---|---|---|---|
channel | string | Current status of get channel | 4.8.0 |
error | any | | |
message | any | | |
status | string | | |
allowSet | boolean | | |
Prop | Type |
---|---|
customId | string |
Prop | Type |
---|---|
remove | () => Promise<void> |
Prop | Type | Description | Since |
---|---|---|---|
percent | number | Current status of download, between 0 and 100. | 4.0.0 |
bundle | | |
Prop | Type | Description | Since |
---|---|---|---|
bundle | Current status of download, between 0 and 100. | 4.0.0 |
Prop | Type | Description | Since |
---|---|---|---|
bundle | Current status of download, between 0 and 100. | 4.0.0 |
Prop | Type | Description | Since |
---|---|---|---|
bundle | Emit when a new update is available. | 4.0.0 |
Prop | Type | Description | Since |
---|---|---|---|
version | string | Emit when a new major bundle is available. | 4.0.0 |
Prop | Type | Description | Since |
---|---|---|---|
bundle | Emit when a update failed to install. | 4.0.0 |
Prop | Type | Description | Since |
---|---|---|---|
version | string | Emit when a download fail. | 4.0.0 |
"success" | "error" | "pending" | "downloading"
"background" | "kill" | "nativeVersion" | "date"
(state: void): void
Last modified 20m ago