When configuring Live Updates in your Ionic app, you have the option to select one of three update methods: background, auto, and none. This article will use case for each method.
Using the auto method
The auto live update method will check for and download an available update as soon as your user opens the app. While the update is downloading, the app will remain on the splash screen.
This helps to enforce that all of your users are using the most recent version of your application, as there is no way for them to bypass the update.
The downside to using the auto method, however, is that it can be a negative experience if the update is rather large, especially if the user has a slow network connection. This will effectively result in the app rendering the splash screen for several seconds until the update is downloaded and applied.
We typically recommend against using this method if your updates are generally large in size or if your app is not making use of differential updates.
Using the background method
The background live update method will check for and download updates while the user is actively using the app. This method typically offers the best experience for your users as the update process is generally invisible, unlike the auto method.
This method requires the minimum background duration parameter, which refers to the time (in seconds) for which the app must be in the background before the app applies the new update.
Unlike the auto method, the background method does not enforce that all users are using the most recent version of your app. This is because the minimum background duration has to be met in order for the update to begin.
This is generally the method we recommend for most use cases, as it provides the best experience for the users of your app.
Using the manual (none) method
If you wish to control when updates occur, you can use the "none" method to make use of the Live Updates API. This allows you to instruct the plugin to check for, download, extract, and apply live updates as part of your business logic. An example use case for this method is in an app that offers a "Check for Updates" button in a settings menu.
This method is highly customizable and can be used to apply live updates if and when a particular condition is met.
The downside to using this method is that it is slightly more complex to implement than the auto and background methods. Additionally, because the update logic lives entirely within the web layer of your app, it can be difficult to revert to a previous live update version if any of this logic is changed and shipped out as an update. As a result, it's highly advisable to test your updates before shipping them out to production.
Comments
0 comments
Article is closed for comments.