October 9, 2023
  • All
  • Product
  • Appflow
  • Capacitor
  • Live Updates

The future of Live Updates is here, and it’s more performant than ever

Cecelia Martinez

Developer Advocate

Instantly deploying live updates to users is one of the most critical benefits of Appflow, Ionic’s mobile CI/CD platform. The Appflow team is excited to announce the beta release of a new, Capacitor-based Live Updates SDK that unlocks exponential performance improvements and new innovation for developers. The new SDK was designed with seamless migration in mind so developers can take advantage of these benefits with little interruption or overhead.

About Appflow Live Updates

Appflow Live Updates let you deploy web code changes directly to users’ installed apps without requiring them to download a new version from the app stores. Think of it as a silent upgrade in the background, one that can fix bugs, introduce new features, or optimize performance. 

This makes for a much better user experience and is a powerful tool to react quickly to user feedback or issues. Because you are only deploying changes to HTML, CSS, and JavaScript, these updates are app store compliant and can allow for strategies like A/B testing, rollbacks, and more.

Why Capacitor?

The team had essentially reached the point where the Cordova-based SDK had maxed out its capabilities in terms of features. Cordova relies heavily on the JavaScript layer for its functionality, which limits not just performance, but the potential for future innovation.

That’s where Capacitor comes in. Capacitor is the cross-platform native runtime built by Ionic.  With Capacitor, a significant chunk of the functionality shifts to the native layer. This means faster execution and a broader canvas for feature development.

This shift aligns well with the industry’s overall direction. Many are making the jump from Cordova to Capacitor, given its advantages in performance and extensibility. By moving to an updated Capacitor-based SDK, we’re setting ourselves up to build and support the most modern and efficient apps possible.

Benefits of upgrading

Users that upgrade to the new Capacitor-based Live Update SDK get the following benefits:

  • Improved Download Speed: Early tests show impressive gains in the speed live updates are downloaded on user devices – ranging from a couple of seconds to tens of seconds based on the app.
  • Parallelized Downloading: Your app pulls in updates even quicker than before.
  • Smart Updates: Differential live updates ensure that only the files changed since the last update get downloaded, meaning a smaller, faster update.

You can expect even more features and enhancements in upcoming releases as we continue to test and expand the new SDK.

Getting started

If you are brand new to Live Updates, you can use the documentation here to set up and start deploying your live updates using the new Capacitor-based SDK.

If you are already set up with the Cordova-based SDK, migration is seamless.

First, remove the Cordova SDK from your project by running the following in your root directory:

npm uninstall cordova-plugin-ionic

If you already have a capacitor.config file, you’ll need to remove any preferences related to the Cordova plugin, such as the DisableDeploy option.

Once you’ve made these changes, sync the project with npx cap sync.

There are some configurations you’ll need to remove at the native layer as well.

For iOS, remove the following variables from ios/App/App/Info.plist:

<key>IonAppId</key>
<string>YOUR_APP_ID</string>
<key>IonChannelName</key>
<string>CHANNEL_NAME</string>
<key>IonUpdateMethod</key>
<string>background</string>
<key>IonMaxVersions</key>
<string>2</string>
<key>IonMinBackgroundDuration</key>
<string>30</string>
<key>IonApi</key>
<string>https://api.ionicjs.com</string>

For Android, remove the following from android/app/src/main/res/values/strings.xml:

<string name="ionic_app_id">YOUR_APP_ID</string>
<string name="ionic_channel_name">CHANNEL_NAME</string>
<string name="ionic_update_method">background</string>
<string name="ionic_max_versions">2</string>
<string name="ionic_min_background_duration">30</string>
<string name="ionic_update_api">https://api.ionicjs.com</string>

Once the Cordova plugin has been removed, you can add Capacitor to your project if needed, then go through the process of creating a new native build to complete the migration.

The full migration guide is available here, including specific differences between the two versions of the SDK. We also recommend reviewing the new SDK API reference here. This new SDK is supported for Capacitor apps and Self-Hosted Live Updates. Support for Federated Capacitor and Portals is coming soon!

The Capacitor plugin intentionally launched with less API operations and configuration options than the Cordova plugin to provide a better developer experience. If you feel something is missing or have additional feedback, please reach out to the Appflow team at appflow@ionic.io.

Live Updates are available on all Appflow plans. Get started with a free account today!


Cecelia Martinez

Developer Advocate