MCPcopy Index your code
hub / github.com/Cap-go/capacitor-updater

github.com/Cap-go/capacitor-updater @8.50.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 8.50.2 ↗ · + Follow
1,230 symbols 4,323 edges 45 files 74 documented · 6% updated 5d ago8.50.2 · 2026-07-02★ 800
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Capacitor updater

Capgo - Instant updates for Capacitor Discord Discord npm GitHub latest commit https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg Security Rating Bugs Maintainability Rating Code Smells Vulnerabilities Quality Gate Status Technical Debt Open Bounties Rewarded Bounties

➡️ Get Instant updates for your App with Capgo

Missing a feature? We’ll build the plugin for you 💪

Capacitor plugin to update your app remotely in real-time.

Open-source Alternative to Appflow, Codepush or Capawesome

Why Capacitor Updater?

App store review processes can take days or weeks, blocking critical bug fixes and updates from reaching your users. Capacitor Updater solves this by:

  • Instant updates - Push JavaScript/HTML/CSS updates directly to users without app store review
  • Delta updates - Only download changed files, making updates ultra-fast
  • Rollback protection - Automatically revert broken updates to keep your app stable
  • Open source - Self-host or use Capgo Cloud, with full control over your update infrastructure
  • Battle-tested - Used by 3000+ production apps with proven reliability
  • Most stared - Capacitor updater is the most stared Capacitor plugin on GitHub

Perfect for fixing bugs immediately, A/B testing features, and maintaining control over your release schedule.

Features

  • ☁️ Cloud / Self hosted Support: Use our Cloud to manage your app updates or yours.
  • 📦 Bundle Management: Download, assign to channel, rollback.
  • 📺 Channel Support: Use channels to manage different environments.
  • 🎯 Set Channel to specific device to do QA or debug one user.
  • 🔄 Auto Update: Automatically download and set the latest bundle for the app.
  • 🛟 Rollback: Reset the app to last working bundle if an incompatible bundle has been set.
  • 🔁 Delta Updates: Make instant updates by only downloading changed files.
  • 🔒 Security: Encrypt and sign each updates with best in class security standards.
  • ⚔️ Battle-Tested: Used in more than 3000 projects.
  • 📊 View your deployment statistics
  • 🔋 Supports Android and iOS
  • ⚡️ Capacitor 4/5/6/7/8 support
  • 🌐 Open Source: Licensed under the Mozilla Public License 2.0
  • 🌐 Open Source Backend: Self install our backend in your infra

You have 3 ways possible : - Use 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.

Documentation

The most complete documentation here.

Community

Join the discord to get help.

Migration to v8

This major version is here to follow Capacitor major version 8

First follow the migration guide of Capacitor:

https://capacitorjs.com/docs/updating/8-0

Migration to v7.34

  • Channel storage change: setChannel() now stores channel assignments locally on the device instead of in the cloud. This provides better offline support and reduces backend load.
  • Channel assignments persist between app restarts
  • Use unsetChannel() to clear the local assignment and revert to defaultChannel
  • Old devices (< v7.34.0) use now a KV storage to prevent overload the primary DB of Capgo
  • New event: Listen to the channelPrivate event to handle cases where a user tries to assign themselves to a private channel (one that doesn't allow self-assignment). See example in the setChannel() documentation above.

Migration to v7

The minimum iOS version is now 15.0 to match Capacitor 7/8 requirements.

Starting from v8, the plugin uses ZIPFoundation instead of SSZipArchive/ZipArchive for ZIP extraction. ZIPFoundation uses Apple's native libcompression framework, which removes the previous zlib dependency and its associated security constraints.

Compatibility

Plugin version Capacitor compatibility Maintained
v8.*.* v8.*.*
v7.*.* v7.*.*
v6.*.* v6.*.*
v5.*.* v5.*.*
v4.*.* v4.*.*
v3.*.* v3.*.* ⚠️ Deprecated
> 7 v4.*.* ⚠️ Deprecated, our CI got crazy and bumped too much version

Note: Versions 4, 5, 6, 7, and 8 all share the same features. The major version simply follows your Capacitor version. You can safely use any of these versions that matches your Capacitor installation.

iOS

Privacy manifest

Add the NSPrivacyAccessedAPICategoryUserDefaults dictionary key to your Privacy Manifest (usually ios/App/PrivacyInfo.xcprivacy):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>NSPrivacyAccessedAPITypes</key>
    <array>

      <dict>
        <key>NSPrivacyAccessedAPIType</key>
        <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
        <key>NSPrivacyAccessedAPITypeReasons</key>
        <array>
          <string>CA92.1</string>
        </array>
      </dict>
    </array>
  </dict>
</plist>

We recommend to declare CA92.1 as the reason for accessing the UserDefaults API.

Installation

You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:

npx skills add https://github.com/cap-go/capacitor-skills --skill capacitor-plugins

Then use the following prompt:

Use the `capacitor-plugins` skill from `cap-go/capacitor-skills` to install the `@capgo/capacitor-updater` plugin in my project.

If you prefer Manual Setup, install the plugin by running the following commands and follow the platform-specific instructions below:

Step by step here: Getting started

Or

npm install @capgo/capacitor-updater
npx cap sync

Install a specific version

Use npm tags to install the version matching your Capacitor version:

# For Capacitor 8 (latest)
npm install @capgo/capacitor-updater@latest

# For Capacitor 7
npm install @capgo/capacitor-updater@lts-v7

# For Capacitor 6
npm install @capgo/capacitor-updater@lts-v6

# For Capacitor 5
npm install @capgo/capacitor-updater@lts-v5

# For Capacitor 4
npm install @capgo/capacitor-updater@lts-v4

Auto-update setup

Create your account in capgo.app and get your API key - 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.

No Cloud 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 successfully. 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({
    version: '0.0.4',
    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({
          version: '0.0.4',
          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 - 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 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 fully allowed performing over-the-air updates of JavaScript and assets.

And in its latest version (20170605) downloadable here 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

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 913
Function 185
Interface 69
Class 56
Enum 7

Languages

Java71%
TypeScript29%

Modules by API surface

android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdaterPlugin.java254 symbols
android/src/test/java/ee/forgr/capacitor_updater/CapacitorUpdaterUnitTest.java236 symbols
src/definitions.ts118 symbols
example-app/src/main.js100 symbols
android/src/main/java/ee/forgr/capacitor_updater/CapgoUpdater.java99 symbols
src/web.ts52 symbols
android/src/main/java/ee/forgr/capacitor_updater/ThreeFingerPinchDetector.java35 symbols
android/src/main/java/ee/forgr/capacitor_updater/ShakeMenu.java32 symbols
scripts/maestro/fake-capgo-server.mjs30 symbols
android/src/main/java/ee/forgr/capacitor_updater/Logger.java29 symbols
android/src/main/java/ee/forgr/capacitor_updater/DownloadService.java28 symbols
android/src/main/java/ee/forgr/capacitor_updater/BundleInfo.java26 symbols

For agents

$ claude mcp add capacitor-updater \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page