Improved Native Versioning and White Labeling Enhancements with the Ionic Cloud CLI

I’m happy to announce the addition of two new features to the Ionic Cloud CLI: Live Update channel creation for easier native versioning and native configuration creation for white label enhancements. These additions make it easier to automate the deployment of your Ionic, Cordova, and Capacitor apps.

The Cloud CLI provides the ability to use all of Ionic’s cloud products inside your own CI/CD platform (such as Azure DevOps, Gitlab, Jenkins, and more). You can control exactly when builds are produced and deployed and insert your own processes in between these steps (such as code signing, QA testing, manager approvals, etc.).

Easier Native Versioning with Live Update Channel Creation

The first new feature added to the Cloud CLI is the ability to create a Live Update channel. Live Updates are one of Appflow’s most compelling features since they allow you to ship web code updates directly to users and bypass the app store review process. A channel points to a specific Live Update app build. Any device(s) configured to listen to that channel will receive updates automatically. You can rollback changes and alter to which build a channel points.

To create a new Live Update channel, use this command, specifying the channel name:

$ ionic-cloud destination create channel --name “iOS 1.2.*” --app-id A3211

Straightforward, right? The power comes from how you use it. Over the years, we’ve heard from Appflow customers that it can be tricky to come up with a maintainable versioning strategy. Since Web Native apps consist of two code layers—the web layer and the native layer—keeping them in sync is challenging. This new command enables you to set up Live Updates in a way that many Appflow customers have been creating manually until now.

With this improvement, Live Update channels are now tied to the native platform and the version number, such as “Android 1.2.*.” That way, it’s always clear which web build (aka Live Update) and native version are supported and deployed together.

Here are the steps to implement this in your native build pipeline (some flags omitted), using iOS as the native platform and “1.2.*” as the version number.

  1. Create a new Live Updates channel. The version number can be dynamically set if it’s already stored in your CI/CD system.
$ ionic-cloud destination create channel --name <NEW CHANNEL NAME> 

$ ionic-cloud destination create channel --name “iOS 1.2.*”
  1. Create a new native build that uses the new Live Update channel:
$ ionic-cloud build ios --live-update-channel-name <NEW CHANNEL NAME>

$ ionic-cloud build ios --live-update-channel-name “iOS 1.2.*”
  1. Create a new web build
$ ionic-cloud build web --app-id=<APPFLOW APP ID> --commit=<GIT COMMIT SHA>

$ ionic-cloud build web --app-id=a3B921 --commit=99072aca
  1. Deploy the Live Update
$ ionic-cloud deploy web --app-id=<APPFLOW APP ID> --build-id=<BUILD ID FROM PREVIOUS COMMAND> --destination=<NEW CHANNEL NAME>

$ ionic-cloud deploy web --app-id=a3B921 --build-id=12345 --destination=”iOS 1.2.*”

Later, when a change necessitates a new native build (such as a breaking change, new native plugin installed, etc.), go through the above steps again, this time with an incremental version number (like “1.3.*”). See the docs for complete configuration details.

White Labeling Enhancements

A white label app is a generic application built by a company to resell to another business that, in turn, can rebrand it as their own. Given Ionic’s products make it easy to build cross-platform apps using one codebase, it’s no surprise that white-labeling is a popular use case for Appflow’s cloud services.

In this new feature, you can now pass native configuration variables dynamically to iOS and Android native builds, including app name and bundle ID. Previously, you would have to manually create each native configuration in the Appflow UI one by one. Of course, if you had dozens of apps, that would take a long time!

Now, you can pass in the native config details that you likely already have set up in your CI/CD system to your various application builds. In practice, this looks like this:

$ ionic-cloud build ios --app-bundle-id com.company.apples --app-name Apples
$ ionic-cloud build ios --app-bundle-id com.company.bananas --app-name Bananas
$ ionic-cloud build ios --app-bundle-id com.company.carrots --app-name Carrots

In the above example, you have a template app deployed to the app stores as three separate apps: Apples, Bananas, and Carrots. Bundle IDs and app names are unique, so specify those while reusing the same web build. See the docs on Android builds and iOS builds for more configuration options.

Connect Appflow to your CI/CD Platform Today

To use the latest version of the Ionic Cloud CLI, simply install it as the first step in your CI/CD pipeline:

curl -fsSL https://ionic.io/get-ionic-cloud-cli | bash

If you’d like to lock the version of Ionic Cloud CLI in place for your pipeline, use the following command to install the Ionic Cloud CLI instead, replacing X.X.X with your desired version number. This new version is v0.4.0.

export IONIC_CLOUD_VERSION=X.X.X; curl -fsSL https://ionic.io/get-ionic-cloud-cli | bash

Since we introduced the Ionic Cloud CLI last year, we’ve loved hearing from customers about all the ways they are using it in their CI/CD systems. Curious to integrate Appflow into your CI/CD processes? Reach out to get access.

Sign up for the Ionic Newsletter to get the latest news and updates!

Notable Replies

  1. Great Suff!

    Is this also available for the basic and startup plans?

  2. Thanks, we’re excited to keep making the Cloud CLI better.

    This is available on the Startup plan.