5.9.4 • Published 6 days ago

@capgo/capacitor-updater v5.9.4

Weekly downloads
-
License
MPL-2.0
Repository
github
Last release
6 days ago

Capacitor updater

Discord [npm](https://www.npmjs.com/package/@capgo/capacitor-updater) [GitHub latest commit](https://GitHub.com/Cap-go/capacitor-updater/commit/) [https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg](https://good-labs.github.io/greater-good-affirmation) [Security Rating](https://sonarcloud.io/summary/new_code?id=Cap-go_capacitor-updater) [Bugs](https://sonarcloud.io/summary/new_code?id=Cap-go_capacitor-updater) [Maintainability Rating](https://sonarcloud.io/summary/new_code?id=Cap-go_capacitor-updater) [Code Smells](https://sonarcloud.io/summary/new_code?id=Cap-go_capacitor-updater) [Vulnerabilities](https://sonarcloud.io/summary/new_code?id=Cap-go_capacitor-updater) [Quality Gate Status](https://sonarcloud.io/summary/new_code?id=Cap-go_capacitor-updater) [Technical Debt](https://sonarcloud.io/summary/new_code?id=Cap-go_capacitor-updater) [Open Bounties](https://console.algora.io/org/Capgo/bounties?status=open) [Rewarded Bounties](https://console.algora.io/org/Capgo/bounties?status=completed)

Update Ionic Capacitor apps without App/Play Store review (Code-push / hot-code updates).

You have 3 ways possible :

  • Use [capgo.app](https://capgo.app) a full featured auto-update system in 5 min Setup, to manage version, update, revert and see stats.
  • Use your own server update with auto-update system
  • Use manual methods to zip, upload, download, from JS to do it when you want.

Community

Join the [discord](https://discord.gg/VnYRvBfgA6) to get help.

Documentation

I maintain a more user-friendly and complete [documentation here](https://capgo.app/docs/).

Installation

npm install @capgo/capacitor-updater
npx cap sync

Auto-update setup

Create your account in [capgo.app](https://capgo.app) and get your [API key](https://web.capgo.app/dashboard/apikeys)

  • Login to CLI npx @capgo/cli@latest init API_KEY And follow the steps by step to setup your app.

For detailed instructions on the auto-update setup, refer to the [Auto update documentation](https://capgo.app/docs/plugin/cloud-mode/getting-started/).

Manual setup

Download update distribution zipfiles from a custom URL. Manually control the entire update process.

  • Edit your capacitor.config.json like below, set autoUpdate to false.
// capacitor.config.json
{
	"appId": "**.***.**",
	"appName": "Name",
	"plugins": {
		"CapacitorUpdater": {
			"autoUpdate": false,
		}
	}
}
  • Add to your main code
  import { CapacitorUpdater } from '@capgo/capacitor-updater'
  CapacitorUpdater.notifyAppReady()

This informs Capacitor Updater that the current update bundle has loaded succesfully. Failing to call this method will cause your application to be rolled back to the previously successful version (or built-in bundle).

  • Add this to your application.
  const version = await CapacitorUpdater.download({
    url: 'https://github.com/Cap-go/demo-app/releases/download/0.0.4/dist.zip',
  })
  await CapacitorUpdater.set(version); // sets the new version, and reloads the app
  • Failed updates will automatically roll back to the last successful version.
  • Example: Using App-state to control updates, with SplashScreen: You might also consider performing auto-update when application state changes, and using the Splash Screen to improve user experience.
  import { CapacitorUpdater, VersionInfo } from '@capgo/capacitor-updater'
  import { SplashScreen } from '@capacitor/splash-screen'
  import { App } from '@capacitor/app'

  let version: VersionInfo;
  App.addListener('appStateChange', async (state) => {
      if (state.isActive) {
        // Ensure download occurs while the app is active, or download may fail
        version = await CapacitorUpdater.download({
          url: 'https://github.com/Cap-go/demo-app/releases/download/0.0.4/dist.zip',
        })
      }

      if (!state.isActive && version) {
        // Activate the update when the application is sent to background
        SplashScreen.show()
        try {
          await CapacitorUpdater.set(version);
          // At this point, the new version should be active, and will need to hide the splash screen
        } catch () {
          SplashScreen.hide() // Hide the splash screen again if something went wrong
        }
      }
  })

TIP: If you prefer a secure and automated way to update your app, you can use [capgo.app](https://capgo.app) - a full-featured, auto-update system.

Store Guideline Compliance

Android Google Play and iOS App Store have corresponding guidelines that have rules you should be aware of before integrating the Capacitor-updater solution within your application.

Google play

Third paragraph of [Device and Network Abuse](https://support.google.com/googleplay/android-developer/answer/9888379?hl=en) topic describe that updating source code by any method besides Google Play's update mechanism is restricted. But this restriction does not apply to updating JavaScript bundles.

This restriction does not apply to code that runs in a virtual machine and has limited access to Android APIs (such as JavaScript in a web view or browser).

That fully allow Capacitor-updater as it updates just JS bundles and can't update native code part.

App Store

Paragraph 3.3.2, since back in 2015's [Apple Developer Program License Agreement](https://developer.apple.com/programs/ios/information/) fully allowed performing over-the-air updates of JavaScript and assets.

And in its latest version (20170605) [downloadable here](https://developer.apple.com/terms/) this ruling is even broader:

Interpreted code may be downloaded to an Application, but only so long as such code:

  • (a) does not change the primary purpose of the Application by providing features or functionality that are inconsistent with the intended and advertised purpose of the Application as submitted to the App Store
  • (b) does not create a store or storefront for other code or applications
  • (c) does not bypass signing, sandbox, or other security features of the OS.

Capacitor-updater allows you to respect these rules in full compliance, so long as the update you push does not significantly deviate your product from its original App Store approved intent.

To further remain in compliance with Apple's guidelines, we suggest that App Store-distributed apps don't enable the Force update scenario, since in the [App Store Review Guidelines](https://developer.apple.com/app-store/review/guidelines/) it is written that:

Apps must not force users to rate the app, review the app, download other apps, or other similar actions to access functionality, content, or use of the app.

This is not a problem for the default behavior of background update, since it won't force the user to apply the new version until the next app close, but at least you should be aware of that ruling if you decide to show it.

Packaging dist.zip update bundles

Capacitor Updater works by unzipping a compiled app bundle to the native device filesystem. Whatever you choose to name the file you upload/download from your release/update server URL (via either manual or automatic updating), this .zip bundle must meet the following requirements:

  • The zip file should contain the full contents of your production Capacitor build output folder, usually {project directory}/dist/ or {project directory}/www/. This is where index.html will be located, and it should also contain all bundled JavaScript, CSS, and web resources necessary for your app to run.
  • Do not password encrypt the bundle zip file, or it will fail to unpack.
  • Make sure the bundle does not contain any extra hidden files or folders, or it may fail to unpack.

Updater Plugin Config

CapacitorUpdater can be configured with these options:

PropTypeDescriptionDefaultSince
appReadyTimeoutnumberConfigure the number of milliseconds the native plugin should wait before considering an update 'failed'. Only available for Android and iOS.10000 // (10 seconds)
responseTimeoutnumberConfigure the number of milliseconds the native plugin should wait before considering API timeout. Only available for Android and iOS.20 // (20 second)
autoDeleteFailedbooleanConfigure whether the plugin should use automatically delete failed bundles. Only available for Android and iOS.true
autoDeletePreviousbooleanConfigure whether the plugin should use automatically delete previous bundles after a successful update. Only available for Android and iOS.true
autoUpdatebooleanConfigure whether the plugin should use Auto Update via an update server. Only available for Android and iOS.true
resetWhenUpdatebooleanAutomatically delete previous downloaded bundles when a newer native app bundle is installed to the device. Only available for Android and iOS.true
updateUrlstringConfigure the URL / endpoint to which update checks are sent. Only available for Android and iOS.https://api.capgo.app/auto_update
statsUrlstringConfigure the URL / endpoint to which update statistics are sent. Only available for Android and iOS. Set to "" to disable stats reporting.https://api.capgo.app/stats
privateKeystringConfigure the private key for end to end live update encryption. Only available for Android and iOS.undefined
versionstringConfigure 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.undefined4.17.48
directUpdatebooleanMake the plugin direct install the update when the app what just updated/installed. Only for autoUpdate mode. Only available for Android and iOS.undefined5.1.0
periodCheckDelaynumberConfigure the delay period for period update check. the unit is in seconds. Only available for Android and iOS. Cannot be less than 600 seconds (10 minutes).600 // (10 minutes)
localS3booleanConfigure the CLI to use a local server for testing or self-hosted update server.undefined4.17.48
localHoststringConfigure the CLI to use a local server for testing or self-hosted update server.undefined4.17.48
localWebHoststringConfigure the CLI to use a local server for testing or self-hosted update server.undefined4.17.48
localSupastringConfigure the CLI to use a local server for testing or self-hosted update server.undefined4.17.48
localSupaAnonstringConfigure the CLI to use a local server for testing.undefined4.17.48
allowModifyUrlbooleanAllow the plugin to modify the updateUrl, statsUrl and channelUrl dynamically from the JavaScript side.false5.4.0
defaultChannelstringSet the default channel for the app in the config.undefined5.5.0

Examples

In capacitor.config.json:

{
  "plugins": {
    "CapacitorUpdater": {
      "appReadyTimeout": 1000 // (1 second),
      "responseTimeout": 10 // (10 second),
      "autoDeleteFailed": false,
      "autoDeletePrevious": false,
      "autoUpdate": false,
      "resetWhenUpdate": false,
      "updateUrl": https://example.com/api/auto_update,
      "statsUrl": https://example.com/api/stats,
      "privateKey": undefined,
      "version": undefined,
      "directUpdate": undefined,
      "periodCheckDelay": undefined,
      "localS3": undefined,
      "localHost": undefined,
      "localWebHost": undefined,
      "localSupa": undefined,
      "localSupaAnon": undefined,
      "allowModifyUrl": undefined,
      "defaultChannel": undefined
    }
  }
}

In capacitor.config.ts:

/// <reference types="@capgo/capacitor-updater" />

import { CapacitorConfig } from '@capacitor/cli';

const config: CapacitorConfig = {
  plugins: {
    CapacitorUpdater: {
      appReadyTimeout: 1000 // (1 second),
      responseTimeout: 10 // (10 second),
      autoDeleteFailed: false,
      autoDeletePrevious: false,
      autoUpdate: false,
      resetWhenUpdate: false,
      updateUrl: https://example.com/api/auto_update,
      statsUrl: https://example.com/api/stats,
      privateKey: undefined,
      version: undefined,
      directUpdate: undefined,
      periodCheckDelay: undefined,
      localS3: undefined,
      localHost: undefined,
      localWebHost: undefined,
      localSupa: undefined,
      localSupaAnon: undefined,
      allowModifyUrl: undefined,
      defaultChannel: undefined,
    },
  },
};

export default config;

API

  • [notifyAppReady()](#notifyappready)
  • [setUpdateUrl(...)](#setupdateurl)
  • [setStatsUrl(...)](#setstatsurl)
  • [setChannelUrl(...)](#setchannelurl)
  • [download(...)](#download)
  • [next(...)](#next)
  • [set(...)](#set)
  • [delete(...)](#delete)
  • [list()](#list)
  • [reset(...)](#reset)
  • [current()](#current)
  • [reload()](#reload)
  • [setMultiDelay(...)](#setmultidelay)
  • [cancelDelay()](#canceldelay)
  • [getLatest()](#getlatest)
  • [setChannel(...)](#setchannel)
  • [unsetChannel(...)](#unsetchannel)
  • [getChannel()](#getchannel)
  • [setCustomId(...)](#setcustomid)
  • [getBuiltinVersion()](#getbuiltinversion)
  • [getDeviceId()](#getdeviceid)
  • [getPluginVersion()](#getpluginversion)
  • [isAutoUpdateEnabled()](#isautoupdateenabled)
  • [removeAllListeners()](#removealllisteners)
  • [addListener('download', ...)](#addlistenerdownload)
  • [addListener('noNeedUpdate', ...)](#addlistenernoneedupdate)
  • [addListener('updateAvailable', ...)](#addlistenerupdateavailable)
  • [addListener('downloadComplete', ...)](#addlistenerdownloadcomplete)
  • [addListener('majorAvailable', ...)](#addlistenermajoravailable)
  • [addListener('updateFailed', ...)](#addlistenerupdatefailed)
  • [addListener('downloadFailed', ...)](#addlistenerdownloadfailed)
  • [addListener('appReloaded', ...)](#addlistenerappreloaded)
  • [addListener('appReady', ...)](#addlistenerappready)
  • [Interfaces](#interfaces)
  • [Type Aliases](#type-aliases)

notifyAppReady()

notifyAppReady() => Promise<AppReadyResult>

Notify Capacitor Updater that the current bundle is working (a rollback will occur if this method is not called on every app launch) By default this method should be called in the first 10 sec after app launch, otherwise a rollback will occur. Change this behaviour with {@link appReadyTimeout}

Returns: Promise<AppReadyResult>


setUpdateUrl(...)

setUpdateUrl(options: UpdateUrl) => Promise<void>

Set the updateUrl for the app, this will be used to check for updates.

ParamTypeDescription
optionsUpdateUrlcontains the URL to use for checking for updates.

Since: 5.4.0


setStatsUrl(...)

setStatsUrl(options: StatsUrl) => Promise<void>

Set the statsUrl for the app, this will be used to send statistics. Passing an empty string will disable statistics gathering.

ParamTypeDescription
optionsStatsUrlcontains the URL to use for sending statistics.

Since: 5.4.0


setChannelUrl(...)

setChannelUrl(options: ChannelUrl) => Promise<void>

Set the channelUrl for the app, this will be used to set the channel.

ParamTypeDescription
optionsChannelUrlcontains the URL to use for setting the channel.

Since: 5.4.0


download(...)

download(options: DownloadOptions) => 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

ParamTypeDescription
optionsDownloadOptionsThe {@link DownloadOptions} for downloading a new bundle zip.

Returns: Promise<BundleInfo>


next(...)

next(options: BundleId) => Promise<BundleInfo>

Set the next bundle to be used when the app is reloaded.

ParamTypeDescription
optionsBundleIdContains the ID of the next Bundle to set on next app launch. {@link BundleInfo.id}

Returns: Promise<BundleInfo>


set(...)

set(options: BundleId) => Promise<void>

Set the current bundle and immediately reloads the app.

ParamTypeDescription
optionsBundleIdA {@link BundleId} object containing the new bundle id to set as current.

delete(...)

delete(options: BundleId) => Promise<void>

Deletes the specified bundle from the native app storage. Use with {@link list} to get the stored Bundle IDs.

ParamTypeDescription
optionsBundleIdA {@link BundleId} object containing the ID of a bundle to delete (note, this is the bundle id, NOT the version name)

list()

list() => Promise<BundleListResult>

Get all locally downloaded bundles in your app

Returns: Promise<BundleListResult>


reset(...)

reset(options?: ResetOptions | undefined) => Promise<void>

Reset the app to the builtin bundle (the one sent to Apple App Store / Google Play Store ) or the last successfully loaded bundle.

ParamTypeDescription
optionsResetOptionsContaining {@link ResetOptions.toLastSuccessful}, true resets to the builtin bundle and false will reset to the last successfully loaded bundle.

current()

current() => Promise<CurrentBundleResult>

Get the current bundle, if none are set it returns builtin. currentNative is the original bundle installed on the device

Returns: Promise<CurrentBundleResult>


reload()

reload() => Promise<void>

Reload the view


setMultiDelay(...)

setMultiDelay(options: MultiDelayConditions) => Promise<void>

Sets a {@link DelayCondition} array containing conditions that the Plugin will use to determine when to install updates.

ParamTypeDescription
optionsMultiDelayConditionsContaining the {@link MultiDelayConditions} array of conditions to set

Since: 4.3.0


cancelDelay()

cancelDelay() => Promise<void>

Cancels a {@link DelayCondition} to process an update immediately.

Since: 4.0.0


getLatest()

getLatest() => Promise<LatestVersion>

Get Latest bundle available from update Url

Returns: Promise<LatestVersion>

Since: 4.0.0


setChannel(...)

setChannel(options: SetChannelOptions) => Promise<ChannelRes>

Sets the channel for this device. The channel has to allow for self assignment for this to work. Do not use this method to set the channel at boot when autoUpdate is enabled in the {@link PluginsConfig}. This method is to set the channel after the app is ready.

ParamTypeDescription
optionsSetChannelOptionsIs the {@link SetChannelOptions} channel to set

Returns: Promise<ChannelRes>

Since: 4.7.0


unsetChannel(...)

unsetChannel(options: UnsetChannelOptions) => Promise<void>

Unset the channel for this device. The device will then return to the default channel

ParamType
optionsUnsetChannelOptions

Since: 4.7.0


getChannel()

getChannel() => Promise<GetChannelRes>

Get the channel for this device

Returns: Promise<GetChannelRes>

Since: 4.8.0


setCustomId(...)

setCustomId(options: SetCustomIdOptions) => Promise<void>

Set a custom ID for this device

ParamTypeDescription
optionsSetCustomIdOptionsis the {@link SetCustomIdOptions} customId to set

Since: 4.9.0


getBuiltinVersion()

getBuiltinVersion() => Promise<BuiltinVersion>

Get the native app version or the builtin version if set in config

Returns: Promise<BuiltinVersion>

Since: 5.2.0


getDeviceId()

getDeviceId() => Promise<DeviceId>

Get unique ID used to identify device (sent to auto update server)

Returns: Promise<DeviceId>


getPluginVersion()

getPluginVersion() => Promise<PluginVersion>

Get the native Capacitor Updater plugin version (sent to auto update server)

Returns: Promise<PluginVersion>


isAutoUpdateEnabled()

isAutoUpdateEnabled() => Promise<AutoUpdateEnabled>

Get the state of auto update config.

Returns: Promise<AutoUpdateEnabled>


removeAllListeners()

removeAllListeners() => Promise<void>

Remove all listeners for this plugin.

Since: 1.0.0


addListener('download', ...)

addListener(eventName: "download", listenerFunc: (state: DownloadEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Listen for bundle download event in the App. Fires once a download has started, during downloading and when finished.

ParamType
eventName'download'
listenerFunc(state: DownloadEvent) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 2.0.11


addListener('noNeedUpdate', ...)

addListener(eventName: "noNeedUpdate", listenerFunc: (state: NoNeedEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Listen for no need to update event, useful when you want force check every time the app is launched

ParamType
eventName'noNeedUpdate'
listenerFunc(state: NoNeedEvent) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 4.0.0


addListener('updateAvailable', ...)

addListener(eventName: "updateAvailable", listenerFunc: (state: UpdateAvailableEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Listen for available update event, useful when you want to force check every time the app is launched

ParamType
eventName'updateAvailable'
listenerFunc(state: UpdateAvailableEvent) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 4.0.0


addListener('downloadComplete', ...)

addListener(eventName: "downloadComplete", listenerFunc: (state: DownloadCompleteEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Listen for downloadComplete events.

ParamType
eventName'downloadComplete'
listenerFunc(state: DownloadCompleteEvent) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 4.0.0


addListener('majorAvailable', ...)

addListener(eventName: "majorAvailable", listenerFunc: (state: MajorAvailableEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Listen for Major update event in the App, let you know when major update is blocked by setting disableAutoUpdateBreaking

ParamType
eventName'majorAvailable'
listenerFunc(state: MajorAvailableEvent) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 2.3.0


addListener('updateFailed', ...)

addListener(eventName: "updateFailed", listenerFunc: (state: UpdateFailedEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Listen for update fail event in the App, let you know when update has fail to install at next app start

ParamType
eventName'updateFailed'
listenerFunc(state: UpdateFailedEvent) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 2.3.0


addListener('downloadFailed', ...)

addListener(eventName: "downloadFailed", listenerFunc: (state: DownloadFailedEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Listen for download fail event in the App, let you know when a bundle download has failed

ParamType
eventName'downloadFailed'
listenerFunc(state: DownloadFailedEvent) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 4.0.0


addListener('appReloaded', ...)

addListener(eventName: "appReloaded", listenerFunc: () => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Listen for reload event in the App, let you know when reload has happened

ParamType
eventName'appReloaded'
listenerFunc() => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 4.3.0


addListener('appReady', ...)

addListener(eventName: "appReady", listenerFunc: (state: AppReadyEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Listen for app ready event in the App, let you know when app is ready to use

ParamType
eventName'appReady'
listenerFunc(state: AppReadyEvent) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 5.1.0


Interfaces

AppReadyResult

PropType
bundleBundleInfo

BundleInfo

PropType
idstring
versionstring
downloadedstring
checksumstring
statusBundleStatus

UpdateUrl

PropType
urlstring

StatsUrl

PropType
urlstring

ChannelUrl

PropType
urlstring

DownloadOptions

PropTypeDescription
urlstringThe URL of the bundle zip file (e.g: dist.zip) to be downloaded. (This can be any URL. E.g: Amazon S3, a GitHub tag, any other place you've hosted your bundle.)
versionstringThe version code/name of this bundle/version
sessionKeystring
checksumstring

BundleId

PropType
idstring

BundleListResult

PropType
bundlesBundleInfo[]

ResetOptions

PropType
toLastSuccessfulboolean

CurrentBundleResult

PropType
bundleBundleInfo
nativestring

MultiDelayConditions

PropType
delayConditionsDelayCondition[]

DelayCondition

PropTypeDescription
kindDelayUntilNextSet up delay conditions in setMultiDelay
valuestring

LatestVersion

PropTypeDescriptionSince
versionstringResult of getLatest method4.0.0
majorboolean
messagestring
sessionKeystring
errorstring
oldstring
urlstring

ChannelRes

PropTypeDescriptionSince
statusstringCurrent status of set channel4.7.0
errorany
messageany

SetChannelOptions

PropType
channelstring
triggerAutoUpdateboolean

UnsetChannelOptions

PropType
triggerAutoUpdateboolean

GetChannelRes

PropTypeDescriptionSince
channelstringCurrent status of get channel4.8.0
errorany
messageany
statusstring
allowSetboolean

SetCustomIdOptions

PropType
customIdstring

BuiltinVersion

PropType
versionstring

DeviceId

PropType
deviceIdstring

PluginVersion

PropType
versionstring

AutoUpdateEnabled

PropType
enabledboolean

PluginListenerHandle

PropType
remove() => Promise<void>

DownloadEvent

PropTypeDescriptionSince
percentnumberCurrent status of download, between 0 and 100.4.0.0
bundleBundleInfo

NoNeedEvent

PropTypeDescriptionSince
bundleBundleInfoCurrent status of download, between 0 and 100.4.0.0

UpdateAvailableEvent

PropTypeDescriptionSince
bundleBundleInfoCurrent status of download, between 0 and 100.4.0.0

DownloadCompleteEvent

PropTypeDescriptionSince
bundleBundleInfoEmit when a new update is available.4.0.0

MajorAvailableEvent

PropTypeDescriptionSince
versionstringEmit when a new major bundle is available.4.0.0

UpdateFailedEvent

PropTypeDescriptionSince
bundleBundleInfoEmit when a update failed to install.4.0.0

DownloadFailedEvent

PropTypeDescriptionSince
versionstringEmit when a download fail.4.0.0

AppReadyEvent

PropTypeDescriptionSince
bundleBundleInfoEmitted when the app is ready to use.5.2.0
statusstring

Type Aliases

BundleStatus

"success" | "error" | "pending" | "downloading"

DelayUntilNext

"background" | "kill" | "nativeVersion" | "date"

Listen to download events

  import { CapacitorUpdater } from '@capgo/capacitor-updater';

CapacitorUpdater.addListener('download', (info: any) => {
  console.log('download was fired', info.percent);
});

On iOS, Apple don't allow you to show a message when the app is updated, so you can't show a progress bar.

Inspiration

Contributors

jamesyoung1337 Thank you so much for your guidance and support, it was impossible to make this plugin work without you.

5.9.4

6 days ago

5.9.3

6 days ago

6.0.0-alpha.2

12 days ago

5.9.2

13 days ago

5.9.1

13 days ago

5.9.0

15 days ago

5.8.12

19 days ago

5.8.10

20 days ago

5.8.11

20 days ago

5.8.9

26 days ago

5.8.8

26 days ago

5.8.7

26 days ago

5.8.6

26 days ago

5.8.5

27 days ago

5.8.4

1 month ago

5.8.3

1 month ago

5.8.2

1 month ago

5.8.1

1 month ago

5.7.20

1 month ago

5.7.19

1 month ago

5.7.18

1 month ago

6.0.0-alpha.0

1 month ago

6.0.0-alpha.1

1 month ago

5.7.17

1 month ago

5.7.16

1 month ago

5.7.15

1 month ago

5.7.15-alpha.0

1 month ago

5.7.15-alpha.1

1 month ago

5.7.10-alpha.0

1 month ago

5.7.10

1 month ago

5.7.12

1 month ago

5.7.11

1 month ago

5.7.14

1 month ago

5.7.13

1 month ago

5.7.9

1 month ago

5.7.7

1 month ago

5.7.4

1 month ago

5.7.14-alpha.0

1 month ago

5.7.3

1 month ago

5.7.2

1 month ago

5.7.1

1 month ago

5.7.0

1 month ago

5.6.15

1 month ago

5.6.14

1 month ago

5.6.13

2 months ago

5.6.12

2 months ago

5.6.11

2 months ago

5.6.10

2 months ago

5.6.9

2 months ago

5.6.8

2 months ago

5.6.7

2 months ago

5.6.6

2 months ago

5.6.5

2 months ago

5.6.4

2 months ago

5.6.3

2 months ago

4.61.11

2 months ago

5.4.1

2 months ago

5.5.1

2 months ago

5.5.0

2 months ago

5.6.2

2 months ago

5.6.1

2 months ago

5.6.0

2 months ago

5.3.57

2 months ago

5.3.56

2 months ago

5.3.55

2 months ago

5.3.54

2 months ago

5.3.53

2 months ago

5.3.48

3 months ago

5.3.46

3 months ago

5.3.45

3 months ago

5.3.44

3 months ago

5.3.43

4 months ago

5.3.42

4 months ago

5.3.41

4 months ago

5.3.40

4 months ago

5.3.39

4 months ago

5.3.38

5 months ago

5.3.37

5 months ago

5.3.36

5 months ago

5.3.35

5 months ago

5.0.20

9 months ago

5.0.21

9 months ago

5.0.9

9 months ago

5.0.8

10 months ago

5.0.7

10 months ago

5.0.6

10 months ago

5.0.5

10 months ago

5.0.10

9 months ago

5.0.11

9 months ago

5.0.13

9 months ago

5.0.14

9 months ago

5.0.15

9 months ago

5.0.16

9 months ago

5.0.17

9 months ago

5.0.18

9 months ago

5.0.19

9 months ago

5.2.9

8 months ago

5.2.8

8 months ago

5.2.7

8 months ago

5.2.6

8 months ago

5.2.5

9 months ago

5.2.4

9 months ago

5.2.2

9 months ago

5.2.1

9 months ago

5.3.34

5 months ago

5.3.9

7 months ago

5.3.33

5 months ago

5.3.8

7 months ago

5.3.32

5 months ago

5.3.7

7 months ago

5.3.31

5 months ago

5.3.6

7 months ago

5.3.30

5 months ago

5.3.5

7 months ago

5.3.4

7 months ago

5.3.3

7 months ago

5.3.29

5 months ago

5.3.26

6 months ago

5.3.25

6 months ago

5.3.24

6 months ago

5.3.23

6 months ago

5.3.22

6 months ago

5.3.21

6 months ago

5.3.20

6 months ago

5.3.14

7 months ago

5.3.13

7 months ago

5.3.12

7 months ago

5.3.11

7 months ago

5.3.10

7 months ago

5.2.35

8 months ago

5.2.34

8 months ago

5.2.33

8 months ago

5.2.32

8 months ago

5.2.30

8 months ago

5.2.29

8 months ago

5.2.28

8 months ago

5.2.27

8 months ago

5.2.22

8 months ago

5.2.21

8 months ago

5.2.20

8 months ago

5.2.18

8 months ago

5.2.17

8 months ago

5.2.16

8 months ago

5.2.15

8 months ago

5.2.14

8 months ago

5.2.13

8 months ago

5.2.12

8 months ago

5.2.10

8 months ago

10.0.0

11 months ago

5.0.1

11 months ago

5.0.0

11 months ago

4.61.10

11 months ago

9.0.0

11 months ago

6.0.0

11 months ago

4.56.0

12 months ago

7.0.0

11 months ago

4.55.0

12 months ago

4.61.3

12 months ago

4.61.4

12 months ago

4.61.1

12 months ago

4.61.2

12 months ago

4.61.7

12 months ago

4.61.8

12 months ago

4.61.5

12 months ago

4.61.6

12 months ago

4.58.0

12 months ago

4.60.0

12 months ago

8.0.0

11 months ago

4.40.0

1 year ago

4.52.0

1 year ago

4.51.0

1 year ago

4.36.0

1 year ago

4.42.0

1 year ago

4.54.0

1 year ago

4.41.0

1 year ago

4.44.0

1 year ago

4.50.0

1 year ago

4.35.0

1 year ago

4.25.0

1 year ago

4.24.0

1 year ago

4.28.0

1 year ago

4.17.46

1 year ago

4.17.47

1 year ago

4.17.41

1 year ago

4.17.42

1 year ago

4.17.43

1 year ago

4.17.44

1 year ago

4.21.0

1 year ago

4.33.0

1 year ago

4.20.0

1 year ago

4.29.0

1 year ago

4.23.0

1 year ago

4.22.0

1 year ago

4.34.0

1 year ago

4.17.40

1 year ago

4.17.39

1 year ago

4.17.35

1 year ago

4.17.36

1 year ago

4.17.37

1 year ago

4.17.38

1 year ago

4.17.32

1 year ago

4.17.33

1 year ago

4.17.34

1 year ago

4.17.30

1 year ago

4.17.31

1 year ago

4.17.26

1 year ago

4.17.27

1 year ago

4.17.24

1 year ago

4.17.25

1 year ago

4.17.20

1 year ago

4.17.21

1 year ago

4.17.22

1 year ago

4.17.23

1 year ago

4.17.7

1 year ago

4.17.8

1 year ago

4.17.9

1 year ago

4.17.10

1 year ago

4.17.11

1 year ago

4.17.12

1 year ago

4.14.18

1 year ago

4.16.0

1 year ago

4.16.1

1 year ago

4.15.4

1 year ago

4.15.5

1 year ago

4.15.6

1 year ago

4.15.1

1 year ago

4.15.2

1 year ago

4.15.3

1 year ago

4.14.5

1 year ago

4.14.6

1 year ago

4.14.7

1 year ago

4.14.8

1 year ago

4.14.1

1 year ago

4.14.2

1 year ago

4.14.3

1 year ago

4.14.4

1 year ago

4.14.9

1 year ago

4.9.0

1 year ago

4.9.1

1 year ago

4.12.11

1 year ago

4.12.10

1 year ago

4.4.10

2 years ago

4.4.3

2 years ago

4.4.12

2 years ago

4.4.11

2 years ago

4.10.1

1 year ago

4.10.2

1 year ago

4.10.4

1 year ago

4.10.0

1 year ago

4.13.6

1 year ago

4.13.7

1 year ago

4.13.8

1 year ago

4.13.2

1 year ago

4.13.3

1 year ago

4.13.4

1 year ago

4.13.5

1 year ago

4.4.9

2 years ago

4.4.8

2 years ago

4.8.1

1 year ago

4.4.5

2 years ago

4.8.0

1 year ago

4.4.4

2 years ago

4.4.7

2 years ago

4.4.6

2 years ago

4.14.16

1 year ago

4.14.17

1 year ago

4.7.0

1 year ago

4.12.8

1 year ago

4.12.9

1 year ago

4.12.3

1 year ago

4.11.12

1 year ago

4.11.11

1 year ago

4.7.2

1 year ago

4.7.1

1 year ago

4.6.1

1 year ago

4.6.0

1 year ago

4.12.2

1 year ago

4.11.4

1 year ago

4.11.5

1 year ago

4.6.3

1 year ago

4.6.2

1 year ago

4.5.0

2 years ago

4.5.1

1 year ago

4.11.3

1 year ago

4.4.1

2 years ago

4.4.0

2 years ago

4.4.2

2 years ago

4.3.4

2 years ago

4.3.3

2 years ago

4.3.6

2 years ago

4.3.5

2 years ago

4.3.7

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

4.3.2

2 years ago

4.3.1

2 years ago

4.3.0

2 years ago

4.0.0-alpha.53

2 years ago

4.0.0-alpha.52

2 years ago

4.0.0-alpha.51

2 years ago

4.0.0-alpha.50

2 years ago

4.0.0-alpha.57

2 years ago

4.0.0-alpha.56

2 years ago

4.0.0-alpha.55

2 years ago

4.0.0-alpha.54

2 years ago

4.2.3

2 years ago

4.2.2

2 years ago

4.0.0-alpha.49

2 years ago

4.2.5

2 years ago

4.0.0-alpha.48

2 years ago

4.2.4

2 years ago

4.0.0-alpha.47

2 years ago

4.2.1

2 years ago

4.2.0

2 years ago

4.0.0-alpha.46

2 years ago

4.0.0-alpha.45

2 years ago

3.3.18

2 years ago

3.3.19

2 years ago

4.2.7

2 years ago

4.2.6

2 years ago

3.3.20

2 years ago

4.1.0

2 years ago

4.1.1

2 years ago

4.0.0-alpha.9

2 years ago

4.0.0-alpha.7

2 years ago

4.0.0-alpha.8

2 years ago

3.2.1-alpha.0

2 years ago

4.0.0-alpha.17

2 years ago

4.0.0-alpha.16

2 years ago

4.0.0-alpha.15

2 years ago

4.0.0-alpha.19

2 years ago

4.0.0-alpha.18

2 years ago

3.3.9

2 years ago

3.3.8

2 years ago

4.0.0-alpha.1

2 years ago

3.3.7

2 years ago

4.0.0-alpha.2

2 years ago

3.3.6

2 years ago

4.0.0-alpha.12

2 years ago

4.0.0-alpha.11

2 years ago

4.0.0-alpha.10

2 years ago

5.0.0-alpha.0

2 years ago

4.0.0-alpha.42

2 years ago

4.0.0-alpha.41

2 years ago

4.0.0-alpha.40

2 years ago

4.0.0-alpha.44

2 years ago

4.0.0-alpha.43

2 years ago

3.3.13

2 years ago

3.3.14

2 years ago

3.3.15

2 years ago

3.3.16

2 years ago

3.3.17

2 years ago

3.3.10

2 years ago

3.3.11

2 years ago

3.3.12

2 years ago

4.0.0-alpha.39

2 years ago

4.0.0-alpha.38

2 years ago

4.0.0-alpha.37

2 years ago

4.0.0-alpha.36

2 years ago

4.0.0-alpha.31

2 years ago

4.0.0-alpha.30

2 years ago

4.0.0-alpha.35

2 years ago

4.0.0-alpha.33

2 years ago

4.0.0-alpha.32

2 years ago

3.3.5

2 years ago

4.0.0-alpha.28

2 years ago

4.0.0-alpha.27

2 years ago

4.0.0-alpha.26

2 years ago

4.0.0-alpha.25

2 years ago

4.0.0-alpha.29

2 years ago

4.0.0-alpha.20

2 years ago

4.0.0-alpha.24

2 years ago

4.0.0-alpha.23

2 years ago

4.0.0-alpha.22

2 years ago

4.0.0-alpha.21

2 years ago

3.3.1

2 years ago

3.3.0

2 years ago

3.2.1

2 years ago

3.3.4

2 years ago

3.3.3

2 years ago

3.3.2

2 years ago

3.2.0

2 years ago

3.1.0

2 years ago

3.0.10

2 years ago

3.0.9

2 years ago

3.0.8

2 years ago

3.0.7

2 years ago

3.0.6

2 years ago

3.0.5

2 years ago

3.0.4

2 years ago

3.0.3

2 years ago