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

Created on November 12, 2023 at 10:55 am

Copied ORG

Instantly deploying live updates to users is one of the most critical benefits of Appflow ORG , Ionic ORG ’s mobile CI/CD platform. The Appflow ORG 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 ORG 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 ORG , and JavaScript ORG , 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 PERSON -based SDK ORG had maxed out its capabilities in terms of features. Cordova PERSON relies heavily on the JavaScript ORG 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 ORG . 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 ORG to Capacitor, given its advantages in performance and extensibility. By moving to an updated Capacitor-based SDK ORG , 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 TIME to tens of seconds based on the app.

Early tests show impressive gains in the speed live updates are downloaded on user devices – ranging from a couple of seconds TIME to tens of seconds based on the app. Parallelized Downloading: Your app pulls in updates even quicker than before.

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 ORG .

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

First ORDINAL , 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 ORG plugin, such as the DisableDeploy ORG 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 ORG , remove the following from android/app ORG /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 ORG 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 CARDINAL versions of the SDK. We also recommend reviewing the new SDK API PRODUCT reference here. This new SDK ORG is supported for Capacitor apps and Self-Hosted Live Updates PERSON . Support for Federated Capacitor and Portals is coming soon!

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

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

Connecting to blog.lzomedia.com... Connected... Page load complete