Skip to main content
@capgo/capacitor-patch Updates Open source

Capacitor Patch Capacitor plugin

Apply version-gated Capacitor core, CLI, plugin, and native project patches during cap sync and update

Install

bun add @capgo/capacitor-patch bunx cap sync
npm, pnpm or yarn
  • npm install @capgo/capacitor-patch
  • pnpm add @capgo/capacitor-patch
  • yarn add @capgo/capacitor-patch

Guide

How to use Capacitor Patch in Capacitor

Using @capgo/capacitor-patch

Apply selected Capacitor fixes from a version-gated patch catalog during cap sync and cap update.

Install

npm install @capgo/capacitor-patch
npx cap sync

List available patches

npx capgo-capacitor-patch list --all

The catalog includes patch IDs, target packages, supported Capacitor versions, and links back to upstream Capacitor PRs.

Select patches in Capacitor config

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

const config: CapacitorConfig = {
  appId: 'com.example.app',
  appName: 'Example',
  webDir: 'dist',
  plugins: {
    CapacitorPatch: {
      patches: ['upstream-pr-8418-android'],
      strict: true,
    },
  },
};

export default config;

Dry-run and sync

npx capgo-capacitor-patch doctor --phase package --strict
npx cap sync

Package patches run before sync and update. Native project patches run after sync and update.

Configuration

  • patches - explicit patch IDs to apply.
  • recommended - apply patches Capgo marks as recommended.
  • disabled - skip a selected patch ID.
  • strict - fail when a selected patch is incompatible or cannot apply.

Full Reference

Keep going from Using @capgo/capacitor-patch

If you are using Using @capgo/capacitor-patch to plan native plugin work, connect it with @capgo/capacitor-patch for the implementation detail in @capgo/capacitor-patch, Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, Adding or Updating Plugins for the implementation detail in Adding or Updating Plugins, and Ionic Enterprise Plugin Alternatives for the product workflow in Ionic Enterprise Plugin Alternatives.

FAQ

Capacitor Patch plugin FAQ

How do I install the Capacitor Patch plugin in a Capacitor app?

Run "bun add @capgo/capacitor-patch" (or "npm install @capgo/capacitor-patch"), then run "bunx cap sync" so the iOS and Android projects pick up the native code. Import it from "@capgo/capacitor-patch" in your app code.

Does @capgo/capacitor-patch work with React, Vue and Angular?

Yes. Capacitor Patch is a Capacitor package, so it works with any web framework that runs inside Capacitor, including Ionic, React, Vue, Angular, Svelte and plain JavaScript.

Which Capacitor version does @capgo/capacitor-patch support?

Capgo plugins follow Capacitor's major version: use the plugin major version that matches your Capacitor major version (for example plugin v8 with Capacitor 8). The compatibility table in the GitHub README lists the maintained versions.

Is @capgo/capacitor-patch free and open source?

Yes. The source code is public on GitHub at https://github.com/Cap-go/capacitor-patch/ and the package is free to install from npm. Bug reports and pull requests are welcome.

Can I update code that uses Capacitor Patch without an App Store review?

Installing or upgrading the plugin changes native code, so it needs a new store build. After that, JavaScript, HTML and CSS changes that call the plugin can ship instantly with Capgo live updates.

Ship Capacitor Patch changes without waiting for app review

Once the plugin is in your store build, Capgo live updates push your JavaScript, HTML and CSS changes to users in minutes.

Start with Capgo