---
title: "Auto-Update SDK"
description: "Enable automatic update checks and installations for internal iOS builds using the Sentry Auto-Update SDK."
url: https://docs.sentry.io/platforms/apple/guides/ios/build-distribution/auto-update/
---

# Auto-Update SDK | Sentry for iOS

This feature is available only if you're in the [Early Adopter program](https://docs.sentry.io/organization/early-adopter-features.md). Features available to Early Adopters are still in-progress and may have bugs. We recognize the irony.

The Auto-Update SDK is designed for **internal builds only** and should never be used in production builds distributed through the App Store.

The Sentry Auto-Update SDK enables your internal iOS builds to automatically check for and install newer versions distributed through Sentry's Build Distribution. This is particularly useful for distributing nightly, alpha, or beta builds to your internal teams. It is not required to use the Sentry crash reporting SDK to use the iOS Auto-Update SDK.

## [Pre-requisites](https://docs.sentry.io/platforms/apple/guides/ios/build-distribution/auto-update.md#pre-requisites)

The SDK can only be installed using Swift Package Manager.

You'll also need an [internal integration token](https://docs.sentry.io/platforms/apple/guides/ios/build-distribution/auto-update.md#create-an-integration-token) with Build Distribution permissions.

## [Create an Integration Token](https://docs.sentry.io/platforms/apple/guides/ios/build-distribution/auto-update.md#create-an-integration-token)

To use the Auto-Update SDK, you need to create an internal integration token with the appropriate permissions:

1. Navigate to **Settings > Custom Integrations** in your Sentry organization

2. Click **Create New Integration**

3. Select **Internal Integration** and click **Next**

4. Give your integration a name (e.g., "Build Distribution")

5. Under **Permissions**, select **Read** next to the **Distribution** scope.

6. Click **Save Changes**

7. Scroll down to the Tokens section and click **New Token**

8. Save the generated token, you'll need it to integrate the SDK

## [Installation](https://docs.sentry.io/platforms/apple/guides/ios/build-distribution/auto-update.md#installation)

Add a dependency on the `SentryDistribution` target contained in the sentry-cocoa package (<https://github.com/getsentry/sentry-cocoa>)

`Package.swift`

```swift
.package(url: "https://github.com/getsentry/sentry-cocoa", from: "9.9.0"),

.target(name: "MyTarget", dependencies: ["SentryDistribution"]),
```

## [Usage](https://docs.sentry.io/platforms/apple/guides/ios/build-distribution/auto-update.md#usage)

Use the SDK by calling `Updater.checkForUpdate(params: )`. In addition to the access token, provide your Sentry org and project slug in the CheckForUpdateParams. For example:

`MyView.swift`

```swift
import SentryDistribution
import SwiftUI

struct MyView: View {
  var body: some View {
    Button("Check For Update") {
      let params = CheckForUpdateParams(
        accessToken: "MY_TOKEN",
        organization: "___ORG_SLUG___",
        project: "___PROJECT_SLUG___")
      Updater.checkForUpdate(params: params) { result in
        handleUpdateResult(result: result)
      }
    }
  }
  
  static func handleUpdateResult(result: Result<UpdateCheckResponse, Error>) {
    guard case let .success(releaseInfo) = result else {
        // Handle error
        return
    }
    
    guard let releaseInfo = releaseInfo.update else {
      print("Already up to date")
      return
    }
    
    guard let url = Updater.buildUrlForInstall(releaseInfo.downloadUrl) else {
      return
    }
    DispatchQueue.main.async {
      Updater.install(url: url)
    }
  }
}
```

## [Install Groups](https://docs.sentry.io/platforms/apple/guides/ios/build-distribution/auto-update.md#install-groups)

Install groups let you control which build the Auto-Update SDK returns when checking for updates. The API always returns a single build — the latest (by semver version, then build number) whose install groups overlap with the filter. Tag your builds with install groups at upload time using sentry-cli or the Fastlane plugin, and the API automatically filters update checks — a device running a build uploaded with `["beta"]` will only see updates from other `["beta"]` builds.

Unlike Android, iOS builds are identified by the UUID of the app binary. However, UUID matching is not guaranteed to identify the exact build you uploaded — the UUID only changes when the main binary changes, so uploads that differ only in other files (such as images) won't be differentiated. For deterministic filtering, configure the SDK to [provide install groups explicitly](https://docs.sentry.io/platforms/apple/guides/ios/build-distribution/install-groups.md#sdk-configuration).

See the [Install Groups guide](https://docs.sentry.io/platforms/apple/guides/ios/build-distribution/install-groups.md) for upload instructions and full details on how filtering works.

## [Security Considerations](https://docs.sentry.io/platforms/apple/guides/ios/build-distribution/auto-update.md#security-considerations)

* **Internal Use Only**: Never ship the auto-update SDK in production builds destined for public app stores
* **Token Security**: The distribution token is embedded in the app and can be extracted by reverse engineering. Use tokens with only the distribution read permission which is the minimum required permission for the auto-update SDK.
