April 15, 2024
  • All
  • Announcements
  • Product
  • Capacitor

Announcing Capacitor 6.0

Dallas James

We’re excited to announce Capacitor 6, the latest upgrade to our native runtime for web apps. This release brings experimental Swift Package Manager support, aligns with Apple’s new privacy requirements, and introduces improvements across the board, ensuring your projects are future-proof and more efficient. With Capacitor 6, we continue our commitment to simplifying cross-platform app development, making it easier for developers to deliver outstanding web-based apps with native performance.

What’s New?

Capacitor 6 brings with it a slew of updates designed to ensure your projects are in lockstep with the latest platform requirements. All of the iOS and Android dependencies have been updated to support Android 14 and iOS 17, ensuring your applications can leverage the newest features and security improvements these platforms offer.

As we announced in our Capacitor 5 updates last year, we are completing the transition to the default value of androidScheme to https. This change is a platform requirement for apps to properly use the Autofill feature on Android. If you have an existing project and are not explicitly setting the androidScheme in your Capacitor configuration file, you should set it to http to avoid any data loss in your application after upgrading.

Upgrading to Capacitor 6 is a breeze, whether you’re a fan of visual interfaces or you prefer the command line, we’ve got you covered:

  • With just a click of a button, the Ionic VSCode extension will upgrade your project to Capacitor 6. This takes the guesswork out of upgrading, streamlining the process so you can focus on what matters most—building amazing apps.
  • For those who live in the terminal, the migrate command is your best friend. Simply install the latest CLI and run npx cap migrate within your project, and watch as your project is upgraded to Capacitor 6.
  • Prefer a more manual approach? The upgrade guide in our docs has you covered there too.

Swift Package Manager

Capacitor 6 introduces experimental support for Swift Package Manager (SPM), bringing a new way to manage dependencies for iOS projects. Starting today, both the core platform and all core plugins are SPM-ready.

While we are working to add SPM support, we’re not leaving out Cocoapods just yet. We plan to support both, with a long-term view of transitioning fully to SPM. This won’t happen overnight, and we’ll guide you through every step when the time comes. This version is our first step, and community feedback and collaboration will help drive this forward. In the coming months, we’ll be working with plugin authors to ensure that the plugins in the community can work with both Cocoapods as well as with SPM.

We’re excited about SPM but recommend keeping it out of production for now. This is new territory, and we want to ensure everything runs smoothly before giving it the green light for production use. More details on how to use SPM in your iOS projects will be coming soon.

Apple Privacy Manifest

In recent months, Apple has announced their latest privacy requirements for applications submitted to the App Store. Capacitor was on the list of frameworks identified to be required to provide additional signatures when used. We’ve rolled out updates across Capacitor 4, 5, and to the newly released Capacitor 6 to align with Apple’s latest privacy mandates. Ensuring compliance for your applications is as straightforward as updating to the latest version of Capacitor.

Additionally, apps that use APIs specified by Apple are now required to submit a privacy manifest detailing the APIs in use along with reason codes explaining the need to use a given API. For most Capacitor applications, these APIs are not used by the application directly, rather by plugins implemented in the project that you as the app author may not understand the reason for. To best support developers, we’ve updated our plugins to explain what APIs are used that require reason codes and what codes should be used for a given plugin.

Starting May 1, 2024, you will be required to include these signatures and privacy reasons when submitting a new or updated app to the App Store.

Understanding the intricacies of Apple’s requirements can be daunting. To that end, we’ve added a comprehensive guide to our documentation. This resource is designed to walk you through preparing your privacy manifests for the App Store, ensuring a smooth submission process.

Thank you!

We’re thrilled to roll out Capacitor 6 and can’t wait for you to try it. A huge thank you to our community for your ongoing support and feedback. Your involvement is what makes Capacitor continually better.

Dallas James