To fix this, we propose something like the following:
- tool_mobile_get_site_config should have the plugin version hash added to its return values. This is stored by the app for later comparison.
- When the app makes a web service call to check for messages, it should also call a new web service function which returns the current plugin version hash.
- If the hash has changed from the initial value, the user is given a prompt that the app needs to reload. Upon confirmation, the reload occurs (presumably something like window.navigator.reload() is sufficient, unless ionic has a tidier way of doing this).
The user should probably be able to cancel the reload in case they are in the middle of something, in which case they will see the prompt again next time it checks.