Rollback for Ionic AppFlow

I would like to implement a rollback feature for our QA testers using AppFlow. I want to give them the ability to rollback to one of the previous few versions with snapshots on the app. I see the getAvailableVersions method on the AppFlow SDK, but I see no way to actually update to a prior version, just the ability to apply the latest update. How do I install a prior snapshot?

This isn’t currently possible on a per device basis. You could roll back to an earlier update on the channel from the dashboard, but it’s not possible to tell the plugin to load an earlier snapshot.

1 Like

Its possible only by updating cordova-plugin-ionic plugin common.ts

Overall procedure might be like

  • Create a dropdown to show versions by using getAvailableVersions of IonicDeploy class.
  • Goto Node_Modules > cordova-plugin-ionic > www > common.ts
  • Define 1 more function here : setCurrentVersion(selectedVersionID)
    const newLocation = this.getSnapshotCacheDir(selectedVersionID);

I knew there are many issues like define function in common.ts might work or not but by making a fork of plugin you can solve this problem.
Similarly what if application’s old version directory is cleanup or app is running for the very first time, all these cases are manageable.

All the best (Y)