Skip to main content
The FlowPilot iOS SDK is a Swift package that turns a placement key into a flow on screen. You configure it once at launch, then ask it to present a placement. The SDK resolves which flow to show, draws it with the FlowPilot runtime, and reports how the user finished. The SDK is open source and published at github.com/flowpilothq/flowpilot-ios-sdk. Add it with Swift Package Manager from that URL (see 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 with the FlowPilot runtime — the same renderer the flow editor uses — hosted in a WKWebView inside your app’s own presentation. The runtime ships inside the SDK and is never downloaded; images, fonts and animations are served from the SDK’s own caches, so a flow renders with no network once it has been warmed. What you approve in the builder is the code that runs.
  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 and Offline and bundled flows for the full fallback chain. It works with both UIKit (presentPlacement(_:from:)) and SwiftUI (createSession(placementKey:) plus the .flowPresenter view modifier).
Before you startYou need:

Requirements

Requirements
  • iOS 15.0+ / macOS 12.0+
  • Swift 5.9+ and Xcode 15.0+
  • One transitive dependency: lottie-ios (4.5.0 and up), pulled in automatically by Swift Package Manager

Where to go next

Installation

Add the Swift package to your Xcode project.

Configuration

Initialize the SDK at launch with your API key and App ID.

Quickstart

Configure, present a placement, and read the result.