New builds are being overridden with old Appflow deployments

I’ve got a question about setting some rules for the Appflow deployments. I’ve added the Master channel to my app and have successfully been pushing new web builds to my installed application, but I’m running into an issue where new app installs are being overridden with older web deployment channels.

For example:

Rev A - Appflow Master Channel configured, APK built and installed

Rev B - Web code changes only, new Appflow build and deployment to Master channel. Installed app gets the update as expected.

Rev C - New code added, maybe has a new capacitor plugin + web updates, requires new APK and install. No new Appflow build, but old master channel from Rev B deployment overrides newer Rev C installed code.

What is the best/easiest way to restrict my Appflow deployments to only be applied if the build on the channel is newer than the installed build? I know that I can restrict deployments based on the min app version, but I’d like to have similar control without necessarily tying it to version numbers.

Thanks in advance.

I’m having exactly the same issue. A new build automatically gets overridden with an old deploy version. Let me know if you work out the correct way of doing it!

I’m not sure if it’s the “correct” way, but I’ve had to a combination of things.

  1. My primary issues were during the testing phase of development, so I’d install a version, make some changes, push new web code, install a newer version, etc. The only way I could solve that was to disable the deployments in the app that I’m installing for testing. The config for this is linked below, you just have to make sure you don’t commit or else you might disable it for production installs.

In capacitor.config.json

"cordova": {
  "preferences": {
    "DisableDeploy": "true"
  }
}

See Appflow docs -> Live Deploy -> Setup for more details.

  1. For builds/installs where I can rely on the version number (eg. Play Store closed testing) I’ve had to lean heavily on the “Versioning” settings of the Appflow build. That let’s you set min/max/equivalent versions to let Appflow determine which installs get the deployment. So if my latest testing version is 1.0.1 then I might do a deployment with min = 1.0.1 and max = 1.0.1 so that the previous version doesn’t get into a funky state with potentially unsupported code and later versions don’t accidentally get overridden.

Hope that helps.

2 Likes

If any has the same problem we solve it using de “versioning” tab that appear on build section on AppFlow. If you use the minimal version of the app , you will avoid overriding a newest version of the app by old live update from appflow.

Hope that helps