Essential Kit
Loading...
Searching...
No Matches
AppUpdater

The AppUpdater class provides cross-platform interface to facilitate updating the current version of the application. More...

Static Public Member Functions

static void Initialize (AppUpdaterUnitySettings settings)
 Initialize the AppUpdater module with the given settings. This call is optional and only need to be called if you have custom settings to initialize this feature.
 
static void RequestUpdateInfo (EventCallback< AppUpdaterUpdateInfo > callback)
 Request the latest available update information for the current version of the application.
 
static void PromptUpdate (PromptUpdateOptions options, EventCallback< float > callback)
 Shows a prompt to the user to update the app.
 

Detailed Description

On iOS platform, an alert is shown to let the user update the application. On Android, it uses native provided In-App update feature and if it fails to update, an alert is shown to let the user update the application.


Member Function Documentation

◆ Initialize()

static void Initialize ( AppUpdaterUnitySettings settings)
static
Parameters
settingsThe settings to be used for initialization.

The settings configure the behavior of the AppUpdater module.

◆ RequestUpdateInfo()

static void RequestUpdateInfo ( EventCallback< AppUpdaterUpdateInfo > callback)
static
Parameters
callbackThe callback that will be executed after the operation has a result or error.

The callback will be invoked with an AppUpdaterUpdateInfo containing the result of the operation.

◆ PromptUpdate()

static void PromptUpdate ( PromptUpdateOptions options,
EventCallback< float > callback )
static
Parameters
optionsThe options to customize the prompt. PromptUpdateOptions instance can be created with PromptUpdateOptions.Builder
callbackThe callback that will be executed after the operation has a result or error.

The prompt will be dismissed when the user selects an option only if IsForceUpdate is false provided in the PromptUpdateOptions.

The callback will receive a boolean value indicating whether the user chose to update the app.