Can I set the Build Native Versioning Min/Max values automatically

I am looking for a way to automatically set the min/max native build version on an AppFlow build.

I would like to set the value either from an API or with a file within the repo that gets build.

Is this possible?

Did you solve this? :blush:

I spoke with Ionic’s engineers about doing this recently and they mentioned that they wouldn’t recommend using that, as there are changes coming to this part of Appflow. We’ve been using the following setup for about 2 years now, and Ionic confirmed that this way is a recommended solution:

  • Create a deployment channel when you build a new native app, i.e. prod_1.1.0.
  • When you need to update the native version and it’s not backwards compatible:
    • Create a new deployment channel that matches your new native version, i.e. prod_1.2.0.
    • Update your Native Config to add your new channel (i.e. prod_1.2.0) to your built IPA/APK files.
    • Build/deploy your new IPA/APK file which points to this new channel.
  • Push future web builds to your new channel.

One caveat is that users on previous versions (in this case prod_1.1.0) are now stuck until they upgrade their native package, but we use Airwatch/Intune to push the latest IPA/APK when we build so that’s not really an issue for us.

We store the channel to push updates to in our source repository in a file called jenkins.appflow.json and Jenkins reads that file and adds the channel to the ionic deploy build --channel=${channel} command. So whenever our developers add something that requires a new native build (and isn’t backwards compatible) we create the new deployment channel and update our jenkins.appflow.json file with the new channel name.

NOTE: We do not create a new channel for EVERY new native package, only ones that aren’t backwards compatible. So if we have to rebuild just to renew a provisioning profile or to add a new capability, we just keep the old channel.

1 Like