AppUpdateDownloadResult
The result of the application update download.
import { AppUpdateDownloadResult } from '@mobrowser/api';
Example
import { app, AppUpdateDownloadResult } from '@mobrowser/api';
const update = await app.checkForUpdate('https://app.com/updates')
if (update && typeof update !== 'string') {
const result: AppUpdateDownloadResult = await update.download()
if (result.success) {
app.restart()
} else {
console.error('Update failed:', result.error)
}
}
Properties
success
readonly success: boolean;
Whether the update was downloaded successfully.
error
readonly error?: string;
The error message if the update download has been failed.