{"id":13504701,"url":"https://github.com/Cap-go/capacitor-updater","last_synced_at":"2025-03-29T22:30:57.286Z","repository":{"id":37850098,"uuid":"420741081","full_name":"Cap-go/capacitor-updater","owner":"Cap-go","description":"Capacitor plugin for Instant updates: Ship updates, fixes, changes, and features within minutes","archived":false,"fork":false,"pushed_at":"2025-03-24T08:34:42.000Z","size":5243,"stargazers_count":577,"open_issues_count":25,"forks_count":116,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-25T00:33:41.241Z","etag":null,"topics":["android","capacitor","capacitor-plugin","cordova","hot-reload","ionic","ios","typescript"],"latest_commit_sha":null,"homepage":"https://capgo.app","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cap-go.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Cap-go","patreon":null,"open_collective":"capgo","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-10-24T16:49:48.000Z","updated_at":"2025-03-24T15:12:58.000Z","dependencies_parsed_at":"2022-06-22T22:45:25.426Z","dependency_job_id":"c0082efc-86dc-43d5-94cb-d4144491d6bf","html_url":"https://github.com/Cap-go/capacitor-updater","commit_stats":{"total_commits":1884,"total_committers":36,"mean_commits":"52.333333333333336","dds":0.5801486199575372,"last_synced_commit":"85918cb9d0df95cd789e6d569e766a2d365297d9"},"previous_names":[],"tags_count":508,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-updater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-updater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-updater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-updater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cap-go","download_url":"https://codeload.github.com/Cap-go/capacitor-updater/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246254077,"owners_count":20747946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","capacitor","capacitor-plugin","cordova","hot-reload","ionic","ios","typescript"],"created_at":"2024-08-01T00:00:49.832Z","updated_at":"2025-03-29T22:30:57.249Z","avatar_url":"https://github.com/Cap-go.png","language":"Java","funding_links":["https://github.com/sponsors/Cap-go","https://opencollective.com/capgo"],"categories":["Awesome Quasar [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)","Plugins","[Capgo plugins](https://capgo.app/)","Java","Capgo Capacitor Plugins"],"sub_categories":["Tutorials","Community Plugins","Core \u0026 Updates"],"readme":"# Capacitor updater\n  \u003ca href=\"https://capgo.app/\"\u003e\u003cimg src='https://raw.githubusercontent.com/Cap-go/capgo/main/assets/capgo_banner.png' alt='Capgo - Instant updates for capacitor'/\u003e\u003c/a\u003e\n[![Discord](https://badgen.net/badge/icon/discord?icon=discord\u0026label)](https://discord.com/invite/VnYRvBfgA6)\n\u003ca href=\"https://discord.com/invite/VnYRvBfgA6\"\u003e\u003cimg src=\"https://img.shields.io/discord/912707985829163099?color=%237289DA\u0026label=Discord\" alt=\"Discord\"\u003e\n[![npm](https://img.shields.io/npm/dm/@capgo/capacitor-updater)](https://www.npmjs.com/package/@capgo/capacitor-updater)\n[![GitHub latest commit](https://badgen.net/github/last-commit/Cap-go/capacitor-updater/main)](https://GitHub.com/Cap-go/capacitor-updater/commit/)\n[![https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg](https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg)](https://good-labs.github.io/greater-good-affirmation)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capacitor-updater\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=Cap-go_capacitor-updater)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capacitor-updater\u0026metric=bugs)](https://sonarcloud.io/summary/new_code?id=Cap-go_capacitor-updater)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capacitor-updater\u0026metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=Cap-go_capacitor-updater)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capacitor-updater\u0026metric=code_smells)](https://sonarcloud.io/summary/new_code?id=Cap-go_capacitor-updater)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capacitor-updater\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=Cap-go_capacitor-updater)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capacitor-updater\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Cap-go_capacitor-updater)\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capacitor-updater\u0026metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=Cap-go_capacitor-updater)\n[![Open Bounties](https://img.shields.io/endpoint?url=https%3A%2F%2Fconsole.algora.io%2Fapi%2Fshields%2FCapgo%2Fbounties%3Fstatus%3Dopen)](https://console.algora.io/org/Capgo/bounties?status=open)\n[![Rewarded Bounties](https://img.shields.io/endpoint?url=https%3A%2F%2Fconsole.algora.io%2Fapi%2Fshields%2FCapgo%2Fbounties%3Fstatus%3Dcompleted)](https://console.algora.io/org/Capgo/bounties?status=completed)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003e\u003ca href=\"https://capgo.app/?ref=plugin\"\u003e ➡️ Get Instant updates for your App with Capgo 🚀\u003c/a\u003e\u003c/h2\u003e\n  \u003ch2\u003e\u003ca href=\"https://capgo.app/consulting/?ref=plugin\"\u003e Fix your annoying bug now, Hire a Capacitor expert 💪\u003c/a\u003e\u003c/h2\u003e\n\u003c/div\u003e\n\nUpdate Ionic Capacitor apps without App/Play Store review (Code-push / hot-code updates).\n\nYou have 3 ways possible :\n- Use [capgo.app](https://capgo.app) a full featured auto-update system in 5 min Setup, to manage version, update, revert and see stats.\n- Use your own server update with auto-update system\n- Use manual methods to zip, upload, download, from JS to do it when you want.\n\n\n## Community\nJoin the [discord](https://discord.gg/VnYRvBfgA6) to get help.\n\n## Documentation\nI maintain a more user-friendly and complete [documentation here](https://capgo.app/docs/).\n\n## Migration to v7\n\n- `privateKey` is not available anymore, it was used for the old encryption method. to migrate foolow this guide : [https://capgo.app/docs/plugin/cloud-mode/getting-started/](https://capgo.app/docs/cli/migrations/encryption/)\n- To capacitor v7 : [https://capacitorjs.com/docs/updating/7-0](https://capacitorjs.com/docs/updating/7-0)\n\n## Compatibility\n\n| Plugin version | Capacitor compatibility | Maintained        |\n| -------------- | ----------------------- | ----------------- |\n| v7.\\*.\\*       | v7.\\*.\\*                | ✅                 |\n| v6.\\*.\\*       | v6.\\*.\\*                | Critical bug only  |\n| v5.\\*.\\*       | v5.\\*.\\*                | ⚠️ Deprecated |\n| v4.\\*.\\*       | v4.\\*.\\*                | ⚠️ Deprecated |\n| v3.\\*.\\*       | v3.\\*.\\*                | ⚠️ Deprecated     |\n| \u003e 7            | v4.\\*.\\*                | ⚠️ Deprecated, our CI got crazy and bumped too much version     |\n\n### iOS\n\n#### Privacy manifest\n\nAdd the `NSPrivacyAccessedAPICategoryUserDefaults` dictionary key to your [Privacy Manifest](https://capacitorjs.com/docs/ios/privacy-manifest) (usually `ios/App/PrivacyInfo.xcprivacy`):\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"\u003e\n\u003cplist version=\"1.0\"\u003e\n  \u003cdict\u003e\n    \u003ckey\u003eNSPrivacyAccessedAPITypes\u003c/key\u003e\n    \u003carray\u003e\n      \u003c!-- Add this dict entry to the array if the file already exists. --\u003e\n      \u003cdict\u003e\n        \u003ckey\u003eNSPrivacyAccessedAPIType\u003c/key\u003e\n        \u003cstring\u003eNSPrivacyAccessedAPICategoryUserDefaults\u003c/string\u003e\n        \u003ckey\u003eNSPrivacyAccessedAPITypeReasons\u003c/key\u003e\n        \u003carray\u003e\n          \u003cstring\u003eCA92.1\u003c/string\u003e\n        \u003c/array\u003e\n      \u003c/dict\u003e\n    \u003c/array\u003e\n  \u003c/dict\u003e\n\u003c/plist\u003e\n```\n\nWe recommend to declare [`CA92.1`](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278401) as the reason for accessing the [`UserDefaults`](https://developer.apple.com/documentation/foundation/userdefaults) API.\n\n## Installation\n\n```bash\nnpm install @capgo/capacitor-updater\nnpx cap sync\n```\n\n## Auto-update setup\n\nCreate your account in [capgo.app](https://capgo.app) and get your [API key](https://web.capgo.app/dashboard/apikeys)\n- Login to CLI `npx @capgo/cli@latest init API_KEY`\nAnd follow the steps by step to setup your app.\n\nFor detailed instructions on the auto-update setup, refer to the [Auto update documentation](https://capgo.app/docs/plugin/cloud-mode/getting-started/).\n\n\n## Manual setup\n\nDownload update distribution zipfiles from a custom URL. Manually control the entire update process.\n\n- Edit your `capacitor.config.json` like below, set `autoUpdate` to false.\n```json\n// capacitor.config.json\n{\n\t\"appId\": \"**.***.**\",\n\t\"appName\": \"Name\",\n\t\"plugins\": {\n\t\t\"CapacitorUpdater\": {\n\t\t\t\"autoUpdate\": false,\n\t\t}\n\t}\n}\n```\n- Add to your main code\n```javascript\n  import { CapacitorUpdater } from '@capgo/capacitor-updater'\n  CapacitorUpdater.notifyAppReady()\n```\nThis 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).\n- Add this to your application.\n```javascript\n  const version = await CapacitorUpdater.download({\n    url: 'https://github.com/Cap-go/demo-app/releases/download/0.0.4/dist.zip',\n  })\n  await CapacitorUpdater.set(version); // sets the new version, and reloads the app\n```\n- Failed updates will automatically roll back to the last successful version.\n- Example: Using App-state to control updates, with SplashScreen:\nYou might also consider performing auto-update when application state changes, and using the Splash Screen to improve user experience.\n```javascript\n  import { CapacitorUpdater, VersionInfo } from '@capgo/capacitor-updater'\n  import { SplashScreen } from '@capacitor/splash-screen'\n  import { App } from '@capacitor/app'\n\n  let version: VersionInfo;\n  App.addListener('appStateChange', async (state) =\u003e {\n      if (state.isActive) {\n        // Ensure download occurs while the app is active, or download may fail\n        version = await CapacitorUpdater.download({\n          url: 'https://github.com/Cap-go/demo-app/releases/download/0.0.4/dist.zip',\n        })\n      }\n\n      if (!state.isActive \u0026\u0026 version) {\n        // Activate the update when the application is sent to background\n        SplashScreen.show()\n        try {\n          await CapacitorUpdater.set(version);\n          // At this point, the new version should be active, and will need to hide the splash screen\n        } catch () {\n          SplashScreen.hide() // Hide the splash screen again if something went wrong\n        }\n      }\n  })\n\n```\n\nTIP: 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.\n\n### Store Guideline Compliance\n\nAndroid 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.\n\n#### Google play\n\nThird 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.\n\u003e 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).\n\nThat fully allow Capacitor-updater as it updates just JS bundles and can't update native code part.\n\n#### App Store\n\nParagraph **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.\n\nAnd in its latest version (20170605) [downloadable here](https://developer.apple.com/terms/) this ruling is even broader:\n\n\u003e Interpreted code may be downloaded to an Application, but only so long as such code:\n- (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\n- (b) does not create a store or storefront for other code or applications\n- (c) does not bypass signing, sandbox, or other security features of the OS.\n\nCapacitor-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.\n\nTo 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:\n\n\u003e 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.\n\nThis 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.\n\n### Packaging `dist.zip` update bundles\n\nCapacitor 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:\n\n- 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.\n- Do not password encrypt the bundle zip file, or it will fail to unpack.\n- Make sure the bundle does not contain any extra hidden files or folders, or it may fail to unpack.\n\n## Updater Plugin Config\n\n\u003cdocgen-config\u003e\n\u003c!--Update the source file JSDoc comments and rerun docgen to update the docs below--\u003e\n\nCapacitorUpdater can be configured with these options:\n\n| Prop                         | Type                 | Description                                                                                                                                                                                     | Default                                            | Since   |\n| ---------------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | ------- |\n| **`appReadyTimeout`**        | \u003ccode\u003enumber\u003c/code\u003e  | Configure the number of milliseconds the native plugin should wait before considering an update 'failed'. Only available for Android and iOS.                                                   | \u003ccode\u003e10000 // (10 seconds)\u003c/code\u003e                 |         |\n| **`responseTimeout`**        | \u003ccode\u003enumber\u003c/code\u003e  | Configure the number of milliseconds the native plugin should wait before considering API timeout. Only available for Android and iOS.                                                          | \u003ccode\u003e20 // (20 second)\u003c/code\u003e                     |         |\n| **`autoDeleteFailed`**       | \u003ccode\u003eboolean\u003c/code\u003e | Configure whether the plugin should use automatically delete failed bundles. Only available for Android and iOS.                                                                                | \u003ccode\u003etrue\u003c/code\u003e                                  |         |\n| **`autoDeletePrevious`**     | \u003ccode\u003eboolean\u003c/code\u003e | Configure whether the plugin should use automatically delete previous bundles after a successful update. Only available for Android and iOS.                                                    | \u003ccode\u003etrue\u003c/code\u003e                                  |         |\n| **`autoUpdate`**             | \u003ccode\u003eboolean\u003c/code\u003e | Configure whether the plugin should use Auto Update via an update server. Only available for Android and iOS.                                                                                   | \u003ccode\u003etrue\u003c/code\u003e                                  |         |\n| **`resetWhenUpdate`**        | \u003ccode\u003eboolean\u003c/code\u003e | Automatically delete previous downloaded bundles when a newer native app bundle is installed to the device. Only available for Android and iOS.                                                 | \u003ccode\u003etrue\u003c/code\u003e                                  |         |\n| **`updateUrl`**              | \u003ccode\u003estring\u003c/code\u003e  | Configure the URL / endpoint to which update checks are sent. Only available for Android and iOS.                                                                                               | \u003ccode\u003ehttps://plugin.capgo.app/updates\u003c/code\u003e      |         |\n| **`channelUrl`**             | \u003ccode\u003estring\u003c/code\u003e  | Configure the URL / endpoint for channel operations. Only available for Android and iOS.                                                                                                        | \u003ccode\u003ehttps://plugin.capgo.app/channel_self\u003c/code\u003e |         |\n| **`statsUrl`**               | \u003ccode\u003estring\u003c/code\u003e  | Configure the URL / endpoint to which update statistics are sent. Only available for Android and iOS. Set to \"\" to disable stats reporting.                                                     | \u003ccode\u003ehttps://plugin.capgo.app/stats\u003c/code\u003e        |         |\n| **`publicKey`**              | \u003ccode\u003estring\u003c/code\u003e  | Configure the public key for end to end live update encryption Version 2 Only available for Android and iOS.                                                                                    | \u003ccode\u003eundefined\u003c/code\u003e                             | 6.2.0   |\n| **`version`**                | \u003ccode\u003estring\u003c/code\u003e  | 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. | \u003ccode\u003eundefined\u003c/code\u003e                             | 4.17.48 |\n| **`directUpdate`**           | \u003ccode\u003eboolean\u003c/code\u003e | Make the plugin direct install the update when the app what just updated/installed. Only for autoUpdate mode. Only available for Android and iOS.                                               | \u003ccode\u003eundefined\u003c/code\u003e                             | 5.1.0   |\n| **`periodCheckDelay`**       | \u003ccode\u003enumber\u003c/code\u003e  | Configure 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).                                   | \u003ccode\u003e600 // (10 minutes)\u003c/code\u003e                   |         |\n| **`localS3`**                | \u003ccode\u003eboolean\u003c/code\u003e | Configure the CLI to use a local server for testing or self-hosted update server.                                                                                                               | \u003ccode\u003eundefined\u003c/code\u003e                             | 4.17.48 |\n| **`localHost`**              | \u003ccode\u003estring\u003c/code\u003e  | Configure the CLI to use a local server for testing or self-hosted update server.                                                                                                               | \u003ccode\u003eundefined\u003c/code\u003e                             | 4.17.48 |\n| **`localWebHost`**           | \u003ccode\u003estring\u003c/code\u003e  | Configure the CLI to use a local server for testing or self-hosted update server.                                                                                                               | \u003ccode\u003eundefined\u003c/code\u003e                             | 4.17.48 |\n| **`localSupa`**              | \u003ccode\u003estring\u003c/code\u003e  | Configure the CLI to use a local server for testing or self-hosted update server.                                                                                                               | \u003ccode\u003eundefined\u003c/code\u003e                             | 4.17.48 |\n| **`localSupaAnon`**          | \u003ccode\u003estring\u003c/code\u003e  | Configure the CLI to use a local server for testing.                                                                                                                                            | \u003ccode\u003eundefined\u003c/code\u003e                             | 4.17.48 |\n| **`localApi`**               | \u003ccode\u003estring\u003c/code\u003e  | Configure the CLI to use a local api for testing.                                                                                                                                               | \u003ccode\u003eundefined\u003c/code\u003e                             | 6.3.3   |\n| **`localApiFiles`**          | \u003ccode\u003estring\u003c/code\u003e  | Configure the CLI to use a local file api for testing.                                                                                                                                          | \u003ccode\u003eundefined\u003c/code\u003e                             | 6.3.3   |\n| **`allowModifyUrl`**         | \u003ccode\u003eboolean\u003c/code\u003e | Allow the plugin to modify the updateUrl, statsUrl and channelUrl dynamically from the JavaScript side.                                                                                         | \u003ccode\u003efalse\u003c/code\u003e                                 | 5.4.0   |\n| **`defaultChannel`**         | \u003ccode\u003estring\u003c/code\u003e  | Set the default channel for the app in the config.                                                                                                                                              | \u003ccode\u003eundefined\u003c/code\u003e                             | 5.5.0   |\n| **`appId`**                  | \u003ccode\u003estring\u003c/code\u003e  | Configure the app id for the app in the config.                                                                                                                                                 | \u003ccode\u003eundefined\u003c/code\u003e                             | 6.0.0   |\n| **`keepUrlPathAfterReload`** | \u003ccode\u003eboolean\u003c/code\u003e | Configure the plugin to keep the URL path after a reload. WARNING: When a reload is triggered, 'window.history' will be cleared.                                                                | \u003ccode\u003efalse\u003c/code\u003e                                 | 6.8.0   |\n\n### Examples\n\nIn `capacitor.config.json`:\n\n```json\n{\n  \"plugins\": {\n    \"CapacitorUpdater\": {\n      \"appReadyTimeout\": 1000 // (1 second),\n      \"responseTimeout\": 10 // (10 second),\n      \"autoDeleteFailed\": false,\n      \"autoDeletePrevious\": false,\n      \"autoUpdate\": false,\n      \"resetWhenUpdate\": false,\n      \"updateUrl\": https://example.com/api/auto_update,\n      \"channelUrl\": https://example.com/api/channel,\n      \"statsUrl\": https://example.com/api/stats,\n      \"publicKey\": undefined,\n      \"version\": undefined,\n      \"directUpdate\": undefined,\n      \"periodCheckDelay\": undefined,\n      \"localS3\": undefined,\n      \"localHost\": undefined,\n      \"localWebHost\": undefined,\n      \"localSupa\": undefined,\n      \"localSupaAnon\": undefined,\n      \"localApi\": undefined,\n      \"localApiFiles\": undefined,\n      \"allowModifyUrl\": undefined,\n      \"defaultChannel\": undefined,\n      \"appId\": undefined,\n      \"keepUrlPathAfterReload\": undefined\n    }\n  }\n}\n```\n\nIn `capacitor.config.ts`:\n\n```ts\n/// \u003creference types=\"@capgo/capacitor-updater\" /\u003e\n\nimport { CapacitorConfig } from '@capacitor/cli';\n\nconst config: CapacitorConfig = {\n  plugins: {\n    CapacitorUpdater: {\n      appReadyTimeout: 1000 // (1 second),\n      responseTimeout: 10 // (10 second),\n      autoDeleteFailed: false,\n      autoDeletePrevious: false,\n      autoUpdate: false,\n      resetWhenUpdate: false,\n      updateUrl: https://example.com/api/auto_update,\n      channelUrl: https://example.com/api/channel,\n      statsUrl: https://example.com/api/stats,\n      publicKey: undefined,\n      version: undefined,\n      directUpdate: undefined,\n      periodCheckDelay: undefined,\n      localS3: undefined,\n      localHost: undefined,\n      localWebHost: undefined,\n      localSupa: undefined,\n      localSupaAnon: undefined,\n      localApi: undefined,\n      localApiFiles: undefined,\n      allowModifyUrl: undefined,\n      defaultChannel: undefined,\n      appId: undefined,\n      keepUrlPathAfterReload: undefined,\n    },\n  },\n};\n\nexport default config;\n```\n\n\u003c/docgen-config\u003e\n\n## API\n\n\u003cdocgen-index\u003e\n\n* [`notifyAppReady()`](#notifyappready)\n* [`setUpdateUrl(...)`](#setupdateurl)\n* [`setStatsUrl(...)`](#setstatsurl)\n* [`setChannelUrl(...)`](#setchannelurl)\n* [`download(...)`](#download)\n* [`next(...)`](#next)\n* [`set(...)`](#set)\n* [`delete(...)`](#delete)\n* [`list(...)`](#list)\n* [`reset(...)`](#reset)\n* [`current()`](#current)\n* [`reload()`](#reload)\n* [`setMultiDelay(...)`](#setmultidelay)\n* [`cancelDelay()`](#canceldelay)\n* [`getLatest(...)`](#getlatest)\n* [`setChannel(...)`](#setchannel)\n* [`unsetChannel(...)`](#unsetchannel)\n* [`getChannel()`](#getchannel)\n* [`setCustomId(...)`](#setcustomid)\n* [`getBuiltinVersion()`](#getbuiltinversion)\n* [`getDeviceId()`](#getdeviceid)\n* [`getPluginVersion()`](#getpluginversion)\n* [`isAutoUpdateEnabled()`](#isautoupdateenabled)\n* [`removeAllListeners()`](#removealllisteners)\n* [`addListener('download', ...)`](#addlistenerdownload-)\n* [`addListener('noNeedUpdate', ...)`](#addlistenernoneedupdate-)\n* [`addListener('updateAvailable', ...)`](#addlistenerupdateavailable-)\n* [`addListener('downloadComplete', ...)`](#addlistenerdownloadcomplete-)\n* [`addListener('majorAvailable', ...)`](#addlistenermajoravailable-)\n* [`addListener('updateFailed', ...)`](#addlistenerupdatefailed-)\n* [`addListener('downloadFailed', ...)`](#addlistenerdownloadfailed-)\n* [`addListener('appReloaded', ...)`](#addlistenerappreloaded-)\n* [`addListener('appReady', ...)`](#addlistenerappready-)\n* [`isAutoUpdateAvailable()`](#isautoupdateavailable)\n* [`getNextBundle()`](#getnextbundle)\n* [Interfaces](#interfaces)\n* [Type Aliases](#type-aliases)\n\n\u003c/docgen-index\u003e\n\n\u003cdocgen-api\u003e\n\u003c!--Update the source file JSDoc comments and rerun docgen to update the docs below--\u003e\n\n### notifyAppReady()\n\n```typescript\nnotifyAppReady() =\u003e Promise\u003cAppReadyResult\u003e\n```\n\nNotify Capacitor Updater that the current bundle is working (a rollback will occur if this method is not called on every app launch)\nBy default this method should be called in the first 10 sec after app launch, otherwise a rollback will occur.\nChange this behaviour with {@link appReadyTimeout}\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#appreadyresult\"\u003eAppReadyResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### setUpdateUrl(...)\n\n```typescript\nsetUpdateUrl(options: UpdateUrl) =\u003e Promise\u003cvoid\u003e\n```\n\nSet the updateUrl for the app, this will be used to check for updates.\n\n| Param         | Type                                            | Description                                       |\n| ------------- | ----------------------------------------------- | ------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#updateurl\"\u003eUpdateUrl\u003c/a\u003e\u003c/code\u003e | contains the URL to use for checking for updates. |\n\n**Since:** 5.4.0\n\n--------------------\n\n\n### setStatsUrl(...)\n\n```typescript\nsetStatsUrl(options: StatsUrl) =\u003e Promise\u003cvoid\u003e\n```\n\nSet the statsUrl for the app, this will be used to send statistics. Passing an empty string will disable statistics gathering.\n\n| Param         | Type                                          | Description                                     |\n| ------------- | --------------------------------------------- | ----------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#statsurl\"\u003eStatsUrl\u003c/a\u003e\u003c/code\u003e | contains the URL to use for sending statistics. |\n\n**Since:** 5.4.0\n\n--------------------\n\n\n### setChannelUrl(...)\n\n```typescript\nsetChannelUrl(options: ChannelUrl) =\u003e Promise\u003cvoid\u003e\n```\n\nSet the channelUrl for the app, this will be used to set the channel.\n\n| Param         | Type                                              | Description                                      |\n| ------------- | ------------------------------------------------- | ------------------------------------------------ |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#channelurl\"\u003eChannelUrl\u003c/a\u003e\u003c/code\u003e | contains the URL to use for setting the channel. |\n\n**Since:** 5.4.0\n\n--------------------\n\n\n### download(...)\n\n```typescript\ndownload(options: DownloadOptions) =\u003e Promise\u003cBundleInfo\u003e\n```\n\nDownload 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\n\n| Param         | Type                                                        | Description                                                                                  |\n| ------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#downloadoptions\"\u003eDownloadOptions\u003c/a\u003e\u003c/code\u003e | The {@link \u003ca href=\"#downloadoptions\"\u003eDownloadOptions\u003c/a\u003e} for downloading a new bundle zip. |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#bundleinfo\"\u003eBundleInfo\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### next(...)\n\n```typescript\nnext(options: BundleId) =\u003e Promise\u003cBundleInfo\u003e\n```\n\nSet the next bundle to be used when the app is reloaded.\n\n| Param         | Type                                          | Description                                                                                                   |\n| ------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#bundleid\"\u003eBundleId\u003c/a\u003e\u003c/code\u003e | Contains the ID of the next Bundle to set on next app launch. {@link \u003ca href=\"#bundleinfo\"\u003eBundleInfo.id\u003c/a\u003e} |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#bundleinfo\"\u003eBundleInfo\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### set(...)\n\n```typescript\nset(options: BundleId) =\u003e Promise\u003cvoid\u003e\n```\n\nSet the current bundle and immediately reloads the app.\n\n| Param         | Type                                          | Description                                                                                       |\n| ------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#bundleid\"\u003eBundleId\u003c/a\u003e\u003c/code\u003e | A {@link \u003ca href=\"#bundleid\"\u003eBundleId\u003c/a\u003e} object containing the new bundle id to set as current. |\n\n--------------------\n\n\n### delete(...)\n\n```typescript\ndelete(options: BundleId) =\u003e Promise\u003cvoid\u003e\n```\n\nDeletes the specified bundle from the native app storage. Use with {@link list} to get the stored Bundle IDs.\n\n| Param         | Type                                          | Description                                                                                                                                   |\n| ------------- | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#bundleid\"\u003eBundleId\u003c/a\u003e\u003c/code\u003e | A {@link \u003ca href=\"#bundleid\"\u003eBundleId\u003c/a\u003e} object containing the ID of a bundle to delete (note, this is the bundle id, NOT the version name) |\n\n--------------------\n\n\n### list(...)\n\n```typescript\nlist(options?: ListOptions | undefined) =\u003e Promise\u003cBundleListResult\u003e\n```\n\nGet all locally downloaded bundles in your app\n\n| Param         | Type                                                | Description                                                            |\n| ------------- | --------------------------------------------------- | ---------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#listoptions\"\u003eListOptions\u003c/a\u003e\u003c/code\u003e | The {@link \u003ca href=\"#listoptions\"\u003eListOptions\u003c/a\u003e} for listing bundles |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#bundlelistresult\"\u003eBundleListResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### reset(...)\n\n```typescript\nreset(options?: ResetOptions | undefined) =\u003e Promise\u003cvoid\u003e\n```\n\nReset the app to the `builtin` bundle (the one sent to Apple App Store / Google Play Store ) or the last successfully loaded bundle.\n\n| Param         | Type                                                  | Description                                                                                                                                                                      |\n| ------------- | ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#resetoptions\"\u003eResetOptions\u003c/a\u003e\u003c/code\u003e | Containing {@link \u003ca href=\"#resetoptions\"\u003eResetOptions.toLastSuccessful\u003c/a\u003e}, `true` resets to the builtin bundle and `false` will reset to the last successfully loaded bundle. |\n\n--------------------\n\n\n### current()\n\n```typescript\ncurrent() =\u003e Promise\u003cCurrentBundleResult\u003e\n```\n\nGet the current bundle, if none are set it returns `builtin`. currentNative is the original bundle installed on the device\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#currentbundleresult\"\u003eCurrentBundleResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### reload()\n\n```typescript\nreload() =\u003e Promise\u003cvoid\u003e\n```\n\nReload the view\n\n--------------------\n\n\n### setMultiDelay(...)\n\n```typescript\nsetMultiDelay(options: MultiDelayConditions) =\u003e Promise\u003cvoid\u003e\n```\n\nSets a {@link \u003ca href=\"#delaycondition\"\u003eDelayCondition\u003c/a\u003e} array containing conditions that the Plugin will use to delay the update.\nAfter all conditions are met, the update process will run start again as usual, so update will be installed after a backgrounding or killing the app.\nFor the `date` kind, the value should be an iso8601 date string.\nFor the `background` kind, the value should be a number in milliseconds.\nFor the `nativeVersion` kind, the value should be the version number.\nFor the `kill` kind, the value is not used.\nThe function has unconsistent behavior the option kill do trigger the update after the first kill and not after the next background like other options. This will be fixed in a future major release.\n\n| Param         | Type                                                                  | Description                                                                                                |\n| ------------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#multidelayconditions\"\u003eMultiDelayConditions\u003c/a\u003e\u003c/code\u003e | Containing the {@link \u003ca href=\"#multidelayconditions\"\u003eMultiDelayConditions\u003c/a\u003e} array of conditions to set |\n\n**Since:** 4.3.0\n\n--------------------\n\n\n### cancelDelay()\n\n```typescript\ncancelDelay() =\u003e Promise\u003cvoid\u003e\n```\n\nCancels a {@link \u003ca href=\"#delaycondition\"\u003eDelayCondition\u003c/a\u003e} to process an update immediately.\n\n**Since:** 4.0.0\n\n--------------------\n\n\n### getLatest(...)\n\n```typescript\ngetLatest(options?: GetLatestOptions | undefined) =\u003e Promise\u003cLatestVersion\u003e\n```\n\nGet Latest bundle available from update Url\n\n| Param         | Type                                                          |\n| ------------- | ------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#getlatestoptions\"\u003eGetLatestOptions\u003c/a\u003e\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#latestversion\"\u003eLatestVersion\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 4.0.0\n\n--------------------\n\n\n### setChannel(...)\n\n```typescript\nsetChannel(options: SetChannelOptions) =\u003e Promise\u003cChannelRes\u003e\n```\n\nSets the channel for this device. The channel has to allow for self assignment for this to work.\nDo not use this method to set the channel at boot when `autoUpdate` is enabled in the {@link PluginsConfig}.\nThis method is to set the channel after the app is ready.\nThis methods send to Capgo backend a request to link the device ID to the channel. Capgo can accept or refuse depending of the setting of your channel.\n\n| Param         | Type                                                            | Description                                                                      |\n| ------------- | --------------------------------------------------------------- | -------------------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#setchanneloptions\"\u003eSetChannelOptions\u003c/a\u003e\u003c/code\u003e | Is the {@link \u003ca href=\"#setchanneloptions\"\u003eSetChannelOptions\u003c/a\u003e} channel to set |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#channelres\"\u003eChannelRes\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 4.7.0\n\n--------------------\n\n\n### unsetChannel(...)\n\n```typescript\nunsetChannel(options: UnsetChannelOptions) =\u003e Promise\u003cvoid\u003e\n```\n\nUnset the channel for this device. The device will then return to the default channel\n\n| Param         | Type                                                                |\n| ------------- | ------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#unsetchanneloptions\"\u003eUnsetChannelOptions\u003c/a\u003e\u003c/code\u003e |\n\n**Since:** 4.7.0\n\n--------------------\n\n\n### getChannel()\n\n```typescript\ngetChannel() =\u003e Promise\u003cGetChannelRes\u003e\n```\n\nGet the channel for this device\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#getchannelres\"\u003eGetChannelRes\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 4.8.0\n\n--------------------\n\n\n### setCustomId(...)\n\n```typescript\nsetCustomId(options: SetCustomIdOptions) =\u003e Promise\u003cvoid\u003e\n```\n\nSet a custom ID for this device\n\n| Param         | Type                                                              | Description                                                                         |\n| ------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#setcustomidoptions\"\u003eSetCustomIdOptions\u003c/a\u003e\u003c/code\u003e | is the {@link \u003ca href=\"#setcustomidoptions\"\u003eSetCustomIdOptions\u003c/a\u003e} customId to set |\n\n**Since:** 4.9.0\n\n--------------------\n\n\n### getBuiltinVersion()\n\n```typescript\ngetBuiltinVersion() =\u003e Promise\u003cBuiltinVersion\u003e\n```\n\nGet the native app version or the builtin version if set in config\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#builtinversion\"\u003eBuiltinVersion\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 5.2.0\n\n--------------------\n\n\n### getDeviceId()\n\n```typescript\ngetDeviceId() =\u003e Promise\u003cDeviceId\u003e\n```\n\nGet unique ID used to identify device (sent to auto update server)\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#deviceid\"\u003eDeviceId\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### getPluginVersion()\n\n```typescript\ngetPluginVersion() =\u003e Promise\u003cPluginVersion\u003e\n```\n\nGet the native Capacitor Updater plugin version (sent to auto update server)\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#pluginversion\"\u003ePluginVersion\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### isAutoUpdateEnabled()\n\n```typescript\nisAutoUpdateEnabled() =\u003e Promise\u003cAutoUpdateEnabled\u003e\n```\n\nGet the state of auto update config.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#autoupdateenabled\"\u003eAutoUpdateEnabled\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### removeAllListeners()\n\n```typescript\nremoveAllListeners() =\u003e Promise\u003cvoid\u003e\n```\n\nRemove all listeners for this plugin.\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### addListener('download', ...)\n\n```typescript\naddListener(eventName: 'download', listenerFunc: (state: DownloadEvent) =\u003e void) =\u003e Promise\u003cPluginListenerHandle\u003e\n```\n\nListen for bundle download event in the App. Fires once a download has started, during downloading and when finished.\n\n| Param              | Type                                                                        |\n| ------------------ | --------------------------------------------------------------------------- |\n| **`eventName`**    | \u003ccode\u003e'download'\u003c/code\u003e                                                     |\n| **`listenerFunc`** | \u003ccode\u003e(state: \u003ca href=\"#downloadevent\"\u003eDownloadEvent\u003c/a\u003e) =\u0026gt; void\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#pluginlistenerhandle\"\u003ePluginListenerHandle\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 2.0.11\n\n--------------------\n\n\n### addListener('noNeedUpdate', ...)\n\n```typescript\naddListener(eventName: 'noNeedUpdate', listenerFunc: (state: NoNeedEvent) =\u003e void) =\u003e Promise\u003cPluginListenerHandle\u003e\n```\n\nListen for no need to update event, useful when you want force check every time the app is launched\n\n| Param              | Type                                                                    |\n| ------------------ | ----------------------------------------------------------------------- |\n| **`eventName`**    | \u003ccode\u003e'noNeedUpdate'\u003c/code\u003e                                             |\n| **`listenerFunc`** | \u003ccode\u003e(state: \u003ca href=\"#noneedevent\"\u003eNoNeedEvent\u003c/a\u003e) =\u0026gt; void\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#pluginlistenerhandle\"\u003ePluginListenerHandle\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 4.0.0\n\n--------------------\n\n\n### addListener('updateAvailable', ...)\n\n```typescript\naddListener(eventName: 'updateAvailable', listenerFunc: (state: UpdateAvailableEvent) =\u003e void) =\u003e Promise\u003cPluginListenerHandle\u003e\n```\n\nListen for available update event, useful when you want to force check every time the app is launched\n\n| Param              | Type                                                                                      |\n| ------------------ | ----------------------------------------------------------------------------------------- |\n| **`eventName`**    | \u003ccode\u003e'updateAvailable'\u003c/code\u003e                                                            |\n| **`listenerFunc`** | \u003ccode\u003e(state: \u003ca href=\"#updateavailableevent\"\u003eUpdateAvailableEvent\u003c/a\u003e) =\u0026gt; void\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#pluginlistenerhandle\"\u003ePluginListenerHandle\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 4.0.0\n\n--------------------\n\n\n### addListener('downloadComplete', ...)\n\n```typescript\naddListener(eventName: 'downloadComplete', listenerFunc: (state: DownloadCompleteEvent) =\u003e void) =\u003e Promise\u003cPluginListenerHandle\u003e\n```\n\nListen for downloadComplete events.\n\n| Param              | Type                                                                                        |\n| ------------------ | ------------------------------------------------------------------------------------------- |\n| **`eventName`**    | \u003ccode\u003e'downloadComplete'\u003c/code\u003e                                                             |\n| **`listenerFunc`** | \u003ccode\u003e(state: \u003ca href=\"#downloadcompleteevent\"\u003eDownloadCompleteEvent\u003c/a\u003e) =\u0026gt; void\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#pluginlistenerhandle\"\u003ePluginListenerHandle\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 4.0.0\n\n--------------------\n\n\n### addListener('majorAvailable', ...)\n\n```typescript\naddListener(eventName: 'majorAvailable', listenerFunc: (state: MajorAvailableEvent) =\u003e void) =\u003e Promise\u003cPluginListenerHandle\u003e\n```\n\nListen for Major update event in the App, let you know when major update is blocked by setting disableAutoUpdateBreaking\n\n| Param              | Type                                                                                    |\n| ------------------ | --------------------------------------------------------------------------------------- |\n| **`eventName`**    | \u003ccode\u003e'majorAvailable'\u003c/code\u003e                                                           |\n| **`listenerFunc`** | \u003ccode\u003e(state: \u003ca href=\"#majoravailableevent\"\u003eMajorAvailableEvent\u003c/a\u003e) =\u0026gt; void\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#pluginlistenerhandle\"\u003ePluginListenerHandle\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 2.3.0\n\n--------------------\n\n\n### addListener('updateFailed', ...)\n\n```typescript\naddListener(eventName: 'updateFailed', listenerFunc: (state: UpdateFailedEvent) =\u003e void) =\u003e Promise\u003cPluginListenerHandle\u003e\n```\n\nListen for update fail event in the App, let you know when update has fail to install at next app start\n\n| Param              | Type                                                                                |\n| ------------------ | ----------------------------------------------------------------------------------- |\n| **`eventName`**    | \u003ccode\u003e'updateFailed'\u003c/code\u003e                                                         |\n| **`listenerFunc`** | \u003ccode\u003e(state: \u003ca href=\"#updatefailedevent\"\u003eUpdateFailedEvent\u003c/a\u003e) =\u0026gt; void\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#pluginlistenerhandle\"\u003ePluginListenerHandle\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 2.3.0\n\n--------------------\n\n\n### addListener('downloadFailed', ...)\n\n```typescript\naddListener(eventName: 'downloadFailed', listenerFunc: (state: DownloadFailedEvent) =\u003e void) =\u003e Promise\u003cPluginListenerHandle\u003e\n```\n\nListen for download fail event in the App, let you know when a bundle download has failed\n\n| Param              | Type                                                                                    |\n| ------------------ | --------------------------------------------------------------------------------------- |\n| **`eventName`**    | \u003ccode\u003e'downloadFailed'\u003c/code\u003e                                                           |\n| **`listenerFunc`** | \u003ccode\u003e(state: \u003ca href=\"#downloadfailedevent\"\u003eDownloadFailedEvent\u003c/a\u003e) =\u0026gt; void\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#pluginlistenerhandle\"\u003ePluginListenerHandle\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 4.0.0\n\n--------------------\n\n\n### addListener('appReloaded', ...)\n\n```typescript\naddListener(eventName: 'appReloaded', listenerFunc: () =\u003e void) =\u003e Promise\u003cPluginListenerHandle\u003e\n```\n\nListen for reload event in the App, let you know when reload has happened\n\n| Param              | Type                       |\n| ------------------ | -------------------------- |\n| **`eventName`**    | \u003ccode\u003e'appReloaded'\u003c/code\u003e |\n| **`listenerFunc`** | \u003ccode\u003e() =\u0026gt; void\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#pluginlistenerhandle\"\u003ePluginListenerHandle\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 4.3.0\n\n--------------------\n\n\n### addListener('appReady', ...)\n\n```typescript\naddListener(eventName: 'appReady', listenerFunc: (state: AppReadyEvent) =\u003e void) =\u003e Promise\u003cPluginListenerHandle\u003e\n```\n\nListen for app ready event in the App, let you know when app is ready to use\n\n| Param              | Type                                                                        |\n| ------------------ | --------------------------------------------------------------------------- |\n| **`eventName`**    | \u003ccode\u003e'appReady'\u003c/code\u003e                                                     |\n| **`listenerFunc`** | \u003ccode\u003e(state: \u003ca href=\"#appreadyevent\"\u003eAppReadyEvent\u003c/a\u003e) =\u0026gt; void\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#pluginlistenerhandle\"\u003ePluginListenerHandle\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 5.1.0\n\n--------------------\n\n\n### isAutoUpdateAvailable()\n\n```typescript\nisAutoUpdateAvailable() =\u003e Promise\u003cAutoUpdateAvailable\u003e\n```\n\nGet if auto update is available (not disabled by serverUrl).\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#autoupdateavailable\"\u003eAutoUpdateAvailable\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### getNextBundle()\n\n```typescript\ngetNextBundle() =\u003e Promise\u003cBundleInfo | null\u003e\n```\n\nGet the next bundle that will be used when the app reloads.\nReturns null if no next bundle is set.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#bundleinfo\"\u003eBundleInfo\u003c/a\u003e | null\u0026gt;\u003c/code\u003e\n\n**Since:** 6.8.0\n\n--------------------\n\n\n### Interfaces\n\n\n#### AppReadyResult\n\n| Prop         | Type                                              |\n| ------------ | ------------------------------------------------- |\n| **`bundle`** | \u003ccode\u003e\u003ca href=\"#bundleinfo\"\u003eBundleInfo\u003c/a\u003e\u003c/code\u003e |\n\n\n#### BundleInfo\n\n| Prop             | Type                                                  |\n| ---------------- | ----------------------------------------------------- |\n| **`id`**         | \u003ccode\u003estring\u003c/code\u003e                                   |\n| **`version`**    | \u003ccode\u003estring\u003c/code\u003e                                   |\n| **`downloaded`** | \u003ccode\u003estring\u003c/code\u003e                                   |\n| **`checksum`**   | \u003ccode\u003estring\u003c/code\u003e                                   |\n| **`status`**     | \u003ccode\u003e\u003ca href=\"#bundlestatus\"\u003eBundleStatus\u003c/a\u003e\u003c/code\u003e |\n\n\n#### UpdateUrl\n\n| Prop      | Type                |\n| --------- | ------------------- |\n| **`url`** | \u003ccode\u003estring\u003c/code\u003e |\n\n\n#### StatsUrl\n\n| Prop      | Type                |\n| --------- | ------------------- |\n| **`url`** | \u003ccode\u003estring\u003c/code\u003e |\n\n\n#### ChannelUrl\n\n| Prop      | Type                |\n| --------- | ------------------- |\n| **`url`** | \u003ccode\u003estring\u003c/code\u003e |\n\n\n#### DownloadOptions\n\n| Prop             | Type                | Description                                                                                                                                                      | Default                | Since |\n| ---------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----- |\n| **`url`**        | \u003ccode\u003estring\u003c/code\u003e | The 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.) |                        |       |\n| **`version`**    | \u003ccode\u003estring\u003c/code\u003e | The version code/name of this bundle/version                                                                                                                     |                        |       |\n| **`sessionKey`** | \u003ccode\u003estring\u003c/code\u003e | The session key for the update                                                                                                                                   | \u003ccode\u003eundefined\u003c/code\u003e | 4.0.0 |\n| **`checksum`**   | \u003ccode\u003estring\u003c/code\u003e | The checksum for the update                                                                                                                                      | \u003ccode\u003eundefined\u003c/code\u003e | 4.0.0 |\n\n\n#### BundleId\n\n| Prop     | Type                |\n| -------- | ------------------- |\n| **`id`** | \u003ccode\u003estring\u003c/code\u003e |\n\n\n#### BundleListResult\n\n| Prop          | Type                      |\n| ------------- | ------------------------- |\n| **`bundles`** | \u003ccode\u003eBundleInfo[]\u003c/code\u003e |\n\n\n#### ListOptions\n\n| Prop      | Type                 | Description                                                                                                                                   | Default            | Since  |\n| --------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ------ |\n| **`raw`** | \u003ccode\u003eboolean\u003c/code\u003e | Whether to return the raw bundle list or the manifest. If true, the list will attempt to read the internal database instead of files on disk. | \u003ccode\u003efalse\u003c/code\u003e | 6.14.0 |\n\n\n#### ResetOptions\n\n| Prop                   | Type                 |\n| ---------------------- | -------------------- |\n| **`toLastSuccessful`** | \u003ccode\u003eboolean\u003c/code\u003e |\n\n\n#### CurrentBundleResult\n\n| Prop         | Type                                              |\n| ------------ | ------------------------------------------------- |\n| **`bundle`** | \u003ccode\u003e\u003ca href=\"#bundleinfo\"\u003eBundleInfo\u003c/a\u003e\u003c/code\u003e |\n| **`native`** | \u003ccode\u003estring\u003c/code\u003e                               |\n\n\n#### MultiDelayConditions\n\n| Prop                  | Type                          |\n| --------------------- | ----------------------------- |\n| **`delayConditions`** | \u003ccode\u003eDelayCondition[]\u003c/code\u003e |\n\n\n#### DelayCondition\n\n| Prop        | Type                                                      | Description                              |\n| ----------- | --------------------------------------------------------- | ---------------------------------------- |\n| **`kind`**  | \u003ccode\u003e\u003ca href=\"#delayuntilnext\"\u003eDelayUntilNext\u003c/a\u003e\u003c/code\u003e | Set up delay conditions in setMultiDelay |\n| **`value`** | \u003ccode\u003estring\u003c/code\u003e                                       |                                          |\n\n\n#### LatestVersion\n\n| Prop             | Type                         | Description                | Since |\n| ---------------- | ---------------------------- | -------------------------- | ----- |\n| **`version`**    | \u003ccode\u003estring\u003c/code\u003e          | Result of getLatest method | 4.0.0 |\n| **`checksum`**   | \u003ccode\u003estring\u003c/code\u003e          |                            | 6     |\n| **`major`**      | \u003ccode\u003eboolean\u003c/code\u003e         |                            |       |\n| **`message`**    | \u003ccode\u003estring\u003c/code\u003e          |                            |       |\n| **`sessionKey`** | \u003ccode\u003estring\u003c/code\u003e          |                            |       |\n| **`error`**      | \u003ccode\u003estring\u003c/code\u003e          |                            |       |\n| **`old`**        | \u003ccode\u003estring\u003c/code\u003e          |                            |       |\n| **`url`**        | \u003ccode\u003estring\u003c/code\u003e          |                            |       |\n| **`manifest`**   | \u003ccode\u003eManifestEntry[]\u003c/code\u003e |                            | 6.1   |\n\n\n#### ManifestEntry\n\n| Prop               | Type                        |\n| ------------------ | --------------------------- |\n| **`file_name`**    | \u003ccode\u003estring \\| null\u003c/code\u003e |\n| **`file_hash`**    | \u003ccode\u003estring \\| null\u003c/code\u003e |\n| **`download_url`** | \u003ccode\u003estring \\| null\u003c/code\u003e |\n\n\n#### GetLatestOptions\n\n| Prop          | Type                | Description                                                                                     | Default                | Since |\n| ------------- | ------------------- | ----------------------------------------------------------------------------------------------- | ---------------------- | ----- |\n| **`channel`** | \u003ccode\u003estring\u003c/code\u003e | The channel to get the latest version for The channel must allow 'self_assign' for this to work | \u003ccode\u003eundefined\u003c/code\u003e | 6.8.0 |\n\n\n#### ChannelRes\n\n| Prop          | Type                | Description                   | Since |\n| ------------- | ------------------- | ----------------------------- | ----- |\n| **`status`**  | \u003ccode\u003estring\u003c/code\u003e | Current status of set channel | 4.7.0 |\n| **`error`**   | \u003ccode\u003estring\u003c/code\u003e |                               |       |\n| **`message`** | \u003ccode\u003estring\u003c/code\u003e |                               |       |\n\n\n#### SetChannelOptions\n\n| Prop                    | Type                 |\n| ----------------------- | -------------------- |\n| **`channel`**           | \u003ccode\u003estring\u003c/code\u003e  |\n| **`triggerAutoUpdate`** | \u003ccode\u003eboolean\u003c/code\u003e |\n\n\n#### UnsetChannelOptions\n\n| Prop                    | Type                 |\n| ----------------------- | -------------------- |\n| **`triggerAutoUpdate`** | \u003ccode\u003eboolean\u003c/code\u003e |\n\n\n#### GetChannelRes\n\n| Prop           | Type                 | Description                   | Since |\n| -------------- | -------------------- | ----------------------------- | ----- |\n| **`channel`**  | \u003ccode\u003estring\u003c/code\u003e  | Current status of get channel | 4.8.0 |\n| **`error`**    | \u003ccode\u003estring\u003c/code\u003e  |                               |       |\n| **`message`**  | \u003ccode\u003estring\u003c/code\u003e  |                               |       |\n| **`status`**   | \u003ccode\u003estring\u003c/code\u003e  |                               |       |\n| **`allowSet`** | \u003ccode\u003eboolean\u003c/code\u003e |                               |       |\n\n\n#### SetCustomIdOptions\n\n| Prop           | Type                |\n| -------------- | ------------------- |\n| **`customId`** | \u003ccode\u003estring\u003c/code\u003e |\n\n\n#### BuiltinVersion\n\n| Prop          | Type                |\n| ------------- | ------------------- |\n| **`version`** | \u003ccode\u003estring\u003c/code\u003e |\n\n\n#### DeviceId\n\n| Prop           | Type                |\n| -------------- | ------------------- |\n| **`deviceId`** | \u003ccode\u003estring\u003c/code\u003e |\n\n\n#### PluginVersion\n\n| Prop          | Type                |\n| ------------- | ------------------- |\n| **`version`** | \u003ccode\u003estring\u003c/code\u003e |\n\n\n#### AutoUpdateEnabled\n\n| Prop          | Type                 |\n| ------------- | -------------------- |\n| **`enabled`** | \u003ccode\u003eboolean\u003c/code\u003e |\n\n\n#### PluginListenerHandle\n\n| Prop         | Type                                      |\n| ------------ | ----------------------------------------- |\n| **`remove`** | \u003ccode\u003e() =\u0026gt; Promise\u0026lt;void\u0026gt;\u003c/code\u003e |\n\n\n#### DownloadEvent\n\n| Prop          | Type                                              | Description                                    | Since |\n| ------------- | ------------------------------------------------- | ---------------------------------------------- | ----- |\n| **`percent`** | \u003ccode\u003enumber\u003c/code\u003e                               | Current status of download, between 0 and 100. | 4.0.0 |\n| **`bundle`**  | \u003ccode\u003e\u003ca href=\"#bundleinfo\"\u003eBundleInfo\u003c/a\u003e\u003c/code\u003e |                                                |       |\n\n\n#### NoNeedEvent\n\n| Prop         | Type                                              | Description                                    | Since |\n| ------------ | ------------------------------------------------- | ---------------------------------------------- | ----- |\n| **`bundle`** | \u003ccode\u003e\u003ca href=\"#bundleinfo\"\u003eBundleInfo\u003c/a\u003e\u003c/code\u003e | Current status of download, between 0 and 100. | 4.0.0 |\n\n\n#### UpdateAvailableEvent\n\n| Prop         | Type                                              | Description                                    | Since |\n| ------------ | ------------------------------------------------- | ---------------------------------------------- | ----- |\n| **`bundle`** | \u003ccode\u003e\u003ca href=\"#bundleinfo\"\u003eBundleInfo\u003c/a\u003e\u003c/code\u003e | Current status of download, between 0 and 100. | 4.0.0 |\n\n\n#### DownloadCompleteEvent\n\n| Prop         | Type                                              | Description                          | Since |\n| ------------ | ------------------------------------------------- | ------------------------------------ | ----- |\n| **`bundle`** | \u003ccode\u003e\u003ca href=\"#bundleinfo\"\u003eBundleInfo\u003c/a\u003e\u003c/code\u003e | Emit when a new update is available. | 4.0.0 |\n\n\n#### MajorAvailableEvent\n\n| Prop          | Type                | Description                                | Since |\n| ------------- | ------------------- | ------------------------------------------ | ----- |\n| **`version`** | \u003ccode\u003estring\u003c/code\u003e | Emit when a new major bundle is available. | 4.0.0 |\n\n\n#### UpdateFailedEvent\n\n| Prop         | Type                                              | Description                           | Since |\n| ------------ | ------------------------------------------------- | ------------------------------------- | ----- |\n| **`bundle`** | \u003ccode\u003e\u003ca href=\"#bundleinfo\"\u003eBundleInfo\u003c/a\u003e\u003c/code\u003e | Emit when a update failed to install. | 4.0.0 |\n\n\n#### DownloadFailedEvent\n\n| Prop          | Type                | Description                | Since |\n| ------------- | ------------------- | -------------------------- | ----- |\n| **`version`** | \u003ccode\u003estring\u003c/code\u003e | Emit when a download fail. | 4.0.0 |\n\n\n#### AppReadyEvent\n\n| Prop         | Type                                              | Description                           | Since |\n| ------------ | ------------------------------------------------- | ------------------------------------- | ----- |\n| **`bundle`** | \u003ccode\u003e\u003ca href=\"#bundleinfo\"\u003eBundleInfo\u003c/a\u003e\u003c/code\u003e | Emitted when the app is ready to use. | 5.2.0 |\n| **`status`** | \u003ccode\u003estring\u003c/code\u003e                               |                                       |       |\n\n\n#### AutoUpdateAvailable\n\n| Prop            | Type                 |\n| --------------- | -------------------- |\n| **`available`** | \u003ccode\u003eboolean\u003c/code\u003e |\n\n\n### Type Aliases\n\n\n#### BundleStatus\n\n\u003ccode\u003e'success' | 'error' | 'pending' | 'downloading'\u003c/code\u003e\n\n\n#### DelayUntilNext\n\n\u003ccode\u003e'background' | 'kill' | 'nativeVersion' | 'date'\u003c/code\u003e\n\n\u003c/docgen-api\u003e\n\n### Listen to download events\n\n```javascript\n  import { CapacitorUpdater } from '@capgo/capacitor-updater';\n\nCapacitorUpdater.addListener('download', (info: any) =\u003e {\n  console.log('download was fired', info.percent);\n});\n```\n\nOn iOS, Apple don't allow you to show a message when the app is updated, so you can't show a progress bar.\n\n### Inspiration\n\n- [cordova-plugin-ionic](https://github.com/ionic-team/cordova-plugin-ionic)\n- [capacitor-codepush](https://github.dev/mapiacompany/capacitor-codepush)\n\n\n### Contributors\n\n[jamesyoung1337](https://github.com/jamesyoung1337) Thank you so much for your guidance and support, it was impossible to make this plugin work without you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCap-go%2Fcapacitor-updater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCap-go%2Fcapacitor-updater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCap-go%2Fcapacitor-updater/lists"}