Table of Contents

Class AppUpdateModule

Namespace
Titipi.MocaLib2

Version gate and update prompt. Android asks Google Play In-App Updates whether this specific device can update right now (rollout- and CDN-aware, no version strings involved); iOS compares the running version against the store version mirrored into Remote Config. Both platforms share a Remote Config min_supported_version force gate — see AppUpdateModuleConfig for the key contract. Not supported on WebGL.

public static class AppUpdateModule
Inheritance
AppUpdateModule
Inherited Members

Properties

Config

The config used to initialize this module.

IsInitialized

Whether the module has been successfully initialized.

Initialization

InitializeAsync(AppUpdateModuleConfig)

Initializes the module. Requires FirebaseModule to be initialized first — the version gate reads its thresholds from Remote Config. Not supported on WebGL.

Methods

CheckAsync()

Checks whether an update is available and how urgent it is. Call at startup and again when the app resumes (after FirebaseModule.RefreshRemoteConfigAsync if you want fresh thresholds — this method re-reads Remote Config on every call, no re-init needed). A Soft result means "prompt the player now": returning it starts the SoftPromptCooldownDays window, during which further checks report None. Force is never rate-limited. Every failure mode (Editor, sideloaded build, malformed versions, missing key) degrades to Unknown/None — never a false prompt.

StartUpdateAsync()

Starts the update flow decided by the last CheckAsync(). Android: Google Play's in-app flow — flexible (dismissible dialog, background download) for Soft, immediate (blocking full-screen flow) for Force; a successful update restarts the app. If the in-app flow can't run for a forced update, falls back to opening the Play Store listing. iOS: opens StoreUrl — show your own popup first (RequiresConsentUI). Returns false when there is no update to start, the player canceled, or the flow failed.