4

i have an ionic android mobile app which connects to a ruby on rails api server and this app uses postgresql as database server.

whenever i create a new feature i deploy both, the api and the new app to the app store and bump the respective versions of api and the app, which have their own version numbering sequence.
The api is deployed to the server but app's on users devices are not frequently updated so below 2 cases arise for me

Case 1 : New columns additions
Issue happens for a release when for e.g i have few new columns added to certain tables in db to capture additional info for which respective text fields have also been added to the app's UI.
Here users of the newer version of app will work as expected (send those 2 info to columns) but the older versions will not be sending those 2 field values

Case 2: Columns deleted
for instance i am re-architecting the app in a major way and have to normalized the database as it was inefficient earlier which even leads to breaking of tables etc or deletion of a couple of columns.
Here the older versions of app would simply crash or fail to work.

i feel every business app i build will have this same scenario to manage and it should be common issue to all

I am in the process of writing some custom logic where the app would check when connected to api server for a "update flag" and if the app's version is set to be force updated to make it work with api version then the app would be redirected to play/ app store.

i would like to know how everyone handle this problem and am i doing the right way.

Is there any rails plugin or library which already takes care of this particular problem or helps in doing so. i know there are lot of versioning gems available but they dont take care of this issue [force updating app]

Please guide

1 Answers1

0

I've worked on a project where an API for configuration was called on the Android App Startup. This API would provide 2 fields: major_version and minor_version. If the major_version from the configuration API did not match the one on the App, there would be a popup asking you to force update the App. This would be on the Start-up Screen, so you won't be able to access the actual contents of the App unless you force update your app. If you do not want a force update between 2 app versions or 2 API versions, you have the option of tweaking the minor_version.

Jatin
  • 56
  • 3
  • Hi jatin, yes this is similar to custom logic i am also building. what differs is i am using a seperate update flag to determine where the app version should be forced to update. i am not using the minor major version values because the version sequence for app and api can grow independently for e.g. the app could be at version 3.2.7 and the api could be at 2.8.3. Do you see any advantages of keeping major version of app and api in sync..again dont know the best practices here too – Jagdish Adusumalli Jun 16 '17 at 01:15