> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getflowpilot.io/llms.txt
> Use this file to discover all available pages before exploring further.

# FlowPilot iOS SDK

> A Swift SDK that resolves and renders FlowPilot flows natively in UIKit and SwiftUI apps.

The FlowPilot iOS SDK is a Swift package that turns a placement key into a native flow on screen. You configure it once at launch, then ask it to present a placement. The SDK resolves which flow to show, renders it natively, and reports how the user finished.

The SDK is open source and published at [`github.com/flowpilothq/flowpilot-ios-sdk`](https://github.com/flowpilothq/flowpilot-ios-sdk). Add it with Swift Package Manager from that URL (see [Installation](/ios-sdk/installation)).

## What it does

The SDK does three things for every placement you present:

1. **Resolve.** It asks the FlowPilot backend which flow (and which experiment variant, if any) to show for this placement, user, and audience. Results are cached so the next present is fast.
2. **Render.** It draws the resolved flow as native SwiftUI views. There is no web view. Components, layout, animations, and persistent UI zones all render natively.
3. **Report.** It emits analytics events automatically (`flow_start`, `screen_view`, `flow_complete`, and more) and lets you forward them to your own analytics, plus track conversions for revenue attribution.

The SDK is built to fail safe. If a resolve fails or times out, it falls back to the last cached flow, then a bundled default you ship in the app, then your own native UI. Integrating FlowPilot does not add a way to crash or block your app. See [Caching](/ios-sdk/caching) and [Offline and bundled flows](/ios-sdk/offline-bundled-flows) for the full fallback chain.

It works with both UIKit (`presentPlacement(_:from:)`) and SwiftUI (`createSession(placementKey:)` plus the `.flowPresenter` view modifier).

<Info>
  **Before you start**

  You need:

  * A FlowPilot [workspace](/dashboard/workspaces-and-apps).
  * An [app](/dashboard/workspaces-and-apps) inside that workspace.
  * An [SDK API key](/dashboard/api-keys) for that app.
</Info>

## Requirements

**Requirements**

* iOS 15.0+ / macOS 12.0+
* Swift 5.9+ and Xcode 15.0+
* One transitive dependency: [`lottie-ios`](https://github.com/airbnb/lottie-ios) (4.5.0 and up), pulled in automatically by Swift Package Manager

## Where to go next

<CardGroup cols={3}>
  <Card title="Installation" icon="download" href="/ios-sdk/installation">
    Add the Swift package to your Xcode project.
  </Card>

  <Card title="Configuration" icon="gear" href="/ios-sdk/configuration">
    Initialize the SDK at launch with your API key and App ID.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/ios-sdk/quickstart">
    Configure, present a placement, and read the result.
  </Card>
</CardGroup>

## Related pages

* [Installation](/ios-sdk/installation)
* [Configuration](/ios-sdk/configuration)
* [iOS quickstart](/ios-sdk/quickstart)
* [How FlowPilot works](/get-started/how-it-works)
* [Core concepts](/get-started/core-concepts)
