July 29, 2022
  • All
  • announcements
  • Capacitor
  • release

Announcing Capacitor 4.0

Mike Hartington

Director of Developer Relation...

Today, we’re thrilled to announce the release of Capacitor 4.0 🎉. This new major version brings not only a bunch of bug fixes and improvements to the overall codebase, but also bumps the minimum SDK targets to support new Google Play policies. For folks with existing apps, fear not, upgrading to Capacitor 4.0 is nothing like past releases. Given the rock solid base we created in v3, Capacitor 4.0 only requires a few changes to existing code.

Migrating an Existing App

For folks with existing apps, migrating to Capacitor 4.0 should only require a few changes to your overall codebase. A full migration guide can be found on the docs, which will walk you through the whole process. Install the latest version of the Capacitor CLI to your project using:

npm i -D @capacitor/cli@latest

Once installed, simply run npx cap migrate to have the CLI handle the migration for you. If any of the steps for the migration are not able to be completed, additional information will be made available in the output in the terminal.

Or, for anyone using VS Code, install our Ionic Extension for a 1-click migration. Simply click the “Migrate to Capacitor 4” in your Recommendations and the extension will take care of the rest.

For Plugins, there are a few changes that have been made, so I’d suggest reviewing the Plugins section of the migration docs.

That’s all now, folks! We’re thrilled to ship this new version of Capacitor and can’t wait for you all to update your apps. Cheers!

Mike Hartington

Director of Developer Relation...