> For the complete documentation index, see [llms.txt](https://docs.getupdraft.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getupdraft.com/updraft-sdk/ios-sdk.md).

# Integrating Updraft iOS SDK

## Updraft iOS SDK (Swift / XCFramework)

As of 2.0.0, the iOS SDK is delivered as an **XCFramework** built from the Kotlin Multiplatform `updraft-core` module, not via CocoaPods or Carthage.

**Source:** [github.com/appswithlove/updraft-sdk](https://github.com/appswithlove/updraft-sdk)

> **On the old CocoaPods/Carthage `updraft-sdk-ios`?** That's 1.x. See [Migrating from 1.x.](https://docs.getupdraft.com/updraft-sdk/pages/-LDXZ5Ofkv0pO-iC7jEz#migrating-from-1.x)

### Requirements

* iOS 14.0+
* No Kotlin toolchain needed in your Xcode project (only to build the framework).

### 1. Build the XCFramework

From the SDK repository:

```bash
./gradlew :updraft-core:assembleUpdraftCoreXCFramework
```

Output:

```
updraft-core/build/XCFrameworks/release/UpdraftCore.xcframework
```

### 2. Add it to your Xcode project

Drag `UpdraftCore.xcframework` into your project and add it under **Frameworks, Libraries, and Embedded Content** (Embed & Sign).

### 3. Initialize at launch

```swift
import UpdraftCore

Updraft.shared.start(
    settings: UpdraftSettings(
        appKey: APP_KEY,
        sdkKey: SDK_KEY,
        baseUrl: UpdraftSettings.companion.BASE_URL_PROD,
        logLevel: .error,
        showFeedbackAlert: true,
        feedbackEnabled: true,
        storeRelease: false,
        sendNavigationStack: true
    )
)
```

Get `appKey` and `sdkKey` from your app on [getupdraft.com](https://getupdraft.com).

### Settings

See the full `UpdraftSettings` reference. On iOS:

* `logLevel`: `.none`, `.error` (default), `.debug`
* `baseUrl`: use `UpdraftSettings.companion.BASE_URL_PROD` for the hosted service, or a custom URL for a self-hosted instance.
* Set `storeRelease: true` for App Store builds to disable Updraft features.

### Feedback

Testers trigger feedback by **shaking the device** or **taking a screenshot**. They annotate the captured image and submit it to the Updraft dashboard.

For a custom UI, provide a presenter and send feedback yourself:

```swift
Updraft.shared.setFeedbackUiPresenter { screenshotPng in
    // present your UI, then call sendFeedback(...)
}
```

#### Navigation stack

Attach the current screens to each report by setting a provider, or disable with `sendNavigationStack: false`.

### Auto Update

Enable Auto Update on the getupdraft.com dashboard. The SDK compares the installed build number against the server's latest and prompts testers to install newer builds. Micro-version comparison is supported (e.g. `1.2.3.4 > 1.2.3.3`). See iOS Autoupdate for details.

### Logging

Default is `.error` (errors and warnings only). Use `.debug` to inspect requests and responses during development.
