Forcing an application to be updated to the latest version

My mobile application works with the aid of a back-end server that processes all of the logic for the users, allowing them to communicate and interact with each other. However sometimes when making updates or changes to an application the back-end or format of data may be changed. Possibly because of a logical error (bug) or for security reasons.

Currently I’m trying to figure out the best way to handle this before release of my application to the apple and android store. Whenever an update occurs to the application that requires the server to respond differently, I need to make sure all devices are updated to the proper version, if not there will be errors and some functions of the application may not work or yield unwanted results.

One way to battle this would be to program with the idea of “reverse compatibility” in mind at all times, however sometimes when doing large updates (or even ravamps of systems) this may not be possible, some information may not be used, or additional information may be requires. The format of information may change, etc, etc.

So this brings me to forcing an update for applications. Requiring that the application be brought up to the current version at all times before it can be used.

I’m currently using the Ionic(Cordova) platform for hybrid development and I’m wondering the best approach to take for this. Should I store the application and client version on the server and just have it run a check every so often? Is there a way to check the apple/android store to see if there is an update available for the application and then download it?

Any help would be greatly appreciated.

2 Likes

It’s better to solve this problem before first publication, I have client version sent as an HTTP header upon each request to backend server, if server decides client is too old it returns a specific error code that client uses to trigger a dialog inviting user to upgrade.

So how do you get version of ionic app installed on user’s device?
Any cordova api for that?

Also this approach works well for future builds. How should we invalidate past versions? (as the code for version check or dialog won’t exist in old builds).

Thanks for your input.

I used a simple constant defined in my app, I did put everything in place from the very first released version.
So it will not help in your case if you have old builds already published.

Hello,

The invite is just a message right? Can’t we trigger the update programmatically?

Thanks,
Ashley

Does anyone know if there are there any plug-ins that provide this functionality?