Skip to main content

Built-in screens

The SDK ships three screens and shows them by default:
  • The maintenance and required-update screens cover the whole app and can’t be dismissed. They go away by themselves when the state clears.
  • The update prompt is shown at most once per app session, never on top of a blocking screen, and only after your app’s first screen is ready.
  • Titles, messages and release notes come from the dashboard. Button labels, the “What’s new” heading and the “Expected back at” line are built in, in English and Arabic (right to left), picked from the device language.

Your own screens

Turn the built-in screens off with ui: false and listen to the state instead. The SDK keeps fetching, caching and applying the offline rules; only the drawing is yours.

The state

The state has three parts, each one empty (null, nil) when nothing applies. It is already filtered for the current time, Later and Skip, so you can draw whatever you receive.
  • maintenance is set only while a window is active. A scheduled window stays inside the SDK until its start time.
  • storeUrl is always empty on the web.
  • Field names are the same in every SDK. state and reason are enums in the native SDKs: LerixUpdateState (Flutter .required, Swift .required, Kotlin REQUIRED) and LerixUpdateReason (Flutter and Swift use belowMinimum, blockedVersion and deadlinePassed). Kotlin and the web SDKs keep reason as the string above. A reason the SDK doesn’t know reads as null.
  • Times are DateTime (Flutter), Date (Swift), epoch milliseconds (Kotlin), or ISO strings (web).
Show them in the same order as the built-in UI: maintenance first, then a required update, then a soft prompt.

Helpers

The helpers also record the matching $update_prompt_action event, so the update funnel in Analytics stays complete with your own UI. $update_prompt_shown is recorded only by the built-in UI; in Flutter, call Lerix.appControl.reportPromptShown(update) when your own prompt appears. See Events, webhooks and permissions.

Per SDK

Full example: Flutter.

Turning it off completely

enabled: false stops release control in that app: no checks, no screens and no events. A Lerix SDK switch the device saved earlier still applies until its end time (see Delivery and offline behaviour).