Live Update Manager
The Live Update Manager is used to manage instances of web apps used with Live Updates. It follows a Singleton Pattern to allow access from anywhere in the application. Use the Live Update Manager to configure and run sync to update web apps, check the status of an active sync, and get the file path of the latest web assets on the device.
Functions
Adds an app to the LiveUpdateManager.
Cancel all running sync jobs
Attempts to cancel a running sync job
Synchronous function to check for an update for an app.
Asynchronous function to check for an update for an app.
Clean up any stale app versions. Stale versions are any app snapshot files built for previous versions of the app binary and not currently used by any app channel.
Clean up all unused/old app versions.
Clean up unused/old app versions related to a specific app.
Synchronous function to download an update for an app.
Asynchronous function to download an update for an app.
Synchronous function to extract a downloaded zipped app.
Asynchronous function to extract a downloaded zipped app.
Get the map of all registered apps using Live Updates.
Check the latest time any of the registered apps was synced.
Check when an app was last synced.
Get the latest directory for the updated app resources, if available. If the app has not been updated through Live Updates, null will be returned.
Initializes the file directory and shared preferences used to save update data.
Configure logging output for the Live Updates library. This is enabled by default. If set to false, logging is disabled and should not print to console.
Sets a custom URL for the Live Update Manager to use for syncing. This uses a token provided by Ionic/Outsystems for configuration.
Checks with live updates to see if any new builds are available. If they are, attempt to download, unzip, and update the saved data to reference the latest build.
Checks a single app with live updates to see if any new builds are available. If they are, attempt to download, unzip, and update the saved data to reference the latest build.
Checks all apps or a provided set of apps with live updates to see if any new builds are available. If they are, attempt to download, unzip, and update the saved data to reference the latest build.