Skip to content

In-app updates SDK

The AppGantry iOS SDK (AppGantrySDK) lets your app check for a newer build and prompt the user to install it, without sending anyone back to an install link or an email. Your app asks AppGantry "is there a newer build for this install?", and if there is, it shows a prompt and kicks off the over-the-air install.

Early development

The SDK is on the main branch of the iOS-SDK repository; no tagged releases exist yet. The API is usable but subject to change. See Installation for the branch-pinning caveat.

What it does

  • Checks for updates. checkForUpdate() tells you whether a newer build is available for the current install, whether it is mandatory, and the release notes and version metadata to show.
  • Installs over the air. On iOS, beginInstall(for:) opens the signed itms-services manifest so the device installs the new build in place.
  • Prompts the user. An optional SwiftUI UpdatePromptView renders a ready-made prompt, or you build your own UI from the returned data.
  • Reports install lifecycle. reportInstall(...) lets you record that a download started, an install began, succeeded, or failed. This is the only data the SDK sends, and only when you call it. See Privacy.

When to use it

Reach for the SDK when you want returning users to move to the latest build without leaving the app. If you only distribute builds through tester invitations and install links, you do not need the SDK at all; the getting started flow already covers that.

High-level flow

  1. Construct an AppGantryUpdates actor with your channel's app key and app secret (see Configuration).
  2. Call checkForUpdate(). The SDK enrolls the install on first use and returns an UpdateInfo.
  3. If updateAvailable is true, show a prompt (the built-in UpdatePromptView or your own).
  4. On the user's confirmation, call beginInstall(for:) to start the iOS over-the-air install, and reportInstall(...) to record the lifecycle.

There is no automatic scheduler in the SDK. Your app decides when to call checkForUpdate() (for example on launch, on foreground, or behind a "Check for updates" button).

Requirements

  • iOS 16.0 or later (also supports macOS 13 or later).
  • Swift 5.9 or later.

The Platform type also models android, tvOS, watchOS, visionOS, and wearOS, but the over-the-air install path is iOS-only; other platforms use the direct download methods.

Where to go next