Skip to content

Configuration

Everything the SDK needs is passed in an AppGantryConfiguration, a Sendable value you hand to AppGantryUpdates.

public struct AppGantryConfiguration: Sendable {
    public let baseURL: URL      // e.g. https://api.appgantry.com/sdk/v1
    public let appKey: String    // public, safe to embed in the app
    public let appSecret: String // authorises enrollment for one channel
    public let platform: Platform // defaults to .iOS
}

Construct it directly:

let configuration = AppGantryConfiguration(
    baseURL: URL(string: "https://api.appgantry.com/sdk/v1")!,
    appKey: "<your-app-key>",
    appSecret: "<your-app-secret>"
)

The fields

baseURL

The SDK backend base URL. In production this is https://api.appgantry.com/sdk/v1. This is the /sdk/v1 surface documented in the API reference; it is separate from the /api/v1 surface used for build uploads.

appKey

A public identifier for your app on AppGantry. It is client-embeddable: it identifies which app is asking, and carries no authority on its own.

appSecret

The credential that authorises enrollment. This follows the App Center app-secret model: the secret is embedded in your binary by design. It is scoped to a single channel, and it is revocable. It only authorises exchanging itself for a per-install update token; it does not grant access to your organization, other channels, or the /api/v1 build surface.

The app secret is meant to ship in the binary

Unlike a project access token, the app secret is designed to live in the distributed app. Its blast radius is deliberately narrow (one channel, enrollment only) and you can revoke it from the web app if you need to. Do not reuse a project access token or a personal access token here.

platform

Defaults to .iOS. The Platform enum also models android, tvOS, watchOS, visionOS, and wearOS. It selects which platform's release the backend should answer for.

Where the app key and secret come from

Both values come from your channel's SDK configuration in the AppGantry web app. Open the channel you distribute through and copy the app key and app secret from its SDK settings. If you rotate the secret there, ship an app build with the new value; the old secret stops authorising new enrollments once revoked.

Next