RE : Force users to update their app

Dear All

It appears that a number of users for a rather small app experience delays in being prompted to update to the current code base linked to their production instance.

Some it seems never receive the prompt to update.

We are supporting our clients remotely so I am not sure if this is perhaps a user challenge or an update challenge.

We recently switched to SSO authentication so it is possible that the users are using an older container, could this perhaps be the issue?

In terms of process once I am happy with my code on the Testing instance, I commit all my changes and then deploy to my Production instance.

Am I perhaps missing a key step or is there something I can do to force clients to update to the most current code base?

Kind regards
Matthew Lucas

Hi Mattew

SSO authentication would not impact the update process.

In short, users will get the update once they are able to connect to the backend and download the latest update (this download process happens together with the data sync and is automatic). Once downloaded, the app will provide the user with the option to apply to update now or later. If they select later the update will become available from their app’s context menu (top right corner).

Unfortunately you cannot “force” users to update, but you can, and probably should, keep track of which version of your code they currently have running on their devices.

A fairly easy way to do this is to store a code version number in your code, in the app.js shared JS file is a good place. You should then update this value every time you make changes to your codebase.

Furthermore, you should also provide a way for end users to read/see that value. For example you could just write it to the main.view.xml. In this manner an end user can tell you what code version they see in their app and you can compare that with what you expect them to see.

An even further optimization of this solution is to have your app write that code version value to a field on the User object at certain intervals or logical places in your code (for example every time the user starts a workflow or logs into the app). This will allow you to inspect the value remotely (assuming the device has synched) and monitor which users are using old code vs new code.

One final potential optimization is to also store the expected code version in the DB, update it whenever you update the value in the codebase, and sync that to the device. This will allow you to programmatically compare the expected version in the DB with the current version as per your app.js variable, and if they are different then you know the device has an app code update that it has not yet applied (basically the code changes and the data changes sync ‘together’, and so if the device has the data change but not yet the code change it means that they have not yet ‘applied’ the update’

I hope this helps