Skip to main content
Release control works on iOS, iPadOS and macOS (Mac Catalyst apps count as macOS). For what it does and how to set rules in the dashboard, read Release control.

Setup

Release control is on by default once Lerix.initialize runs, with the built-in screens. To change it, pass appControl:
AppDelegate.swift

Version

The SDK sends CFBundleShortVersionString as the version and CFBundleVersion as the build number, and the bundle ID so Lerix can pick the right store link. Rules compare build numbers when both sides have one.

Instant changes with silent push

When you start or end a maintenance window or force an update, Lerix sends a silent push so apps in the background refresh too. It needs the setup from Push Notifications: the Remote notifications background mode, and didReceiveRemoteNotification forwarding to Lerix.notifications.handleRemoteNotification(userInfo:). The SDK recognises the refresh message and checks right away. Without push, apps pick up the change at their next check.

Built-in screens

  • Maintenance: on iOS, a window of its own above everything else in the app, including alerts, with a Try again button. On macOS, an opaque layer over every app window that takes all clicks and keys; the menu bar (for example Quit) stays usable.
  • Required update: the same full-screen host, with release notes and an Update button that opens the App Store.
  • Update prompt: an alert (macOS: a sheet) with Update, Later and, when allowed, Skip this version. Release notes are added to the message.
Buttons and server copy follow the app’s language (English, or Arabic right to left). See Custom UI for when each one appears.

Your own screens

Set ui: false, then read Lerix.appControl.state and observe changes. The state has update (LerixAppUpdate), maintenance (LerixMaintenance) and sdk (LerixSdkControl), each nil when nothing applies (fields in The state). Changes arrive on the main thread.
onChange holds one closure. To observe from several places, use addListener, which returns a token for removeListener:
The helpers drive the buttons:

Check now

refresh() ignores the saved answer’s lifetime, fetches, and returns the new state. The SDK already checks on launch, when the app returns to the foreground, and every minute during an emergency (see Delivery and offline behaviour).