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 signeditms-servicesmanifest so the device installs the new build in place. - Prompts the user. An optional SwiftUI
UpdatePromptViewrenders 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¶
- Construct an
AppGantryUpdatesactor with your channel's app key and app secret (see Configuration). - Call
checkForUpdate(). The SDK enrolls the install on first use and returns anUpdateInfo. - If
updateAvailableistrue, show a prompt (the built-inUpdatePromptViewor your own). - On the user's confirmation, call
beginInstall(for:)to start the iOS over-the-air install, andreportInstall(...)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¶
- Installation: add the package with Swift Package Manager.
- Quick start: a minimal end-to-end integration.
- Configuration: where the app key and secret come from.
- The update prompt: the built-in view and how to build your own.
- Installing updates: over-the-air and direct download.
- Tokens and errors: enrollment, the token
lifecycle, and
SDKError. - Privacy: what the SDK sends and stores.
- API reference: the underlying
/sdk/v1endpoints.