Before you start
You need an Apple app you can run (a fresh Xcode project is fine) and access to the FlowPilot dashboard.Steps
Create a workspace and app
Sign in to the dashboard and create a workspace (your organization), then create an app for your iOS target inside it. Note the App ID. The SDK needs it at launch.See Workspaces and apps.
Create an SDK API key
In the app’s settings, create an SDK API key. Copy it now, because it is shown only once. This key is different from your dashboard login. The SDK sends it as
Authorization: Bearer <key> to the /v1 API.See API keys.Build a flow and publish it
Open the Flow Editor, add a screen, and drop in a text component and a button. Give the button a
closeFlow action so tapping it ends the flow. Then publish the flow to create a servable version. A draft is never served.See Your first screen and Publishing.Create a placement and attach the flow
Create a placement with a key like
onboarding. Set its default flow version to the one you just published, and make sure the placement targets the iOS platform.See Creating placements.Add the SDK to your app
Add the FlowPilot Swift package to your Xcode project with Swift Package Manager.See Installation.
Configure the SDK at launch
Call The environment defaults to
FlowPilot.configure(_:) once at app launch with your API key and App ID..production. The SDK expects the API key to start with fp_. If it does not, configuration is skipped and an error is logged. See Configuration.Present the placement
Ask the SDK to resolve and present your placement. Use the placement key from step 4.See Presenting placements for results, options, and the never-throws fallback variant.
- UIKit
- SwiftUI
Common mistakes
- Using a dashboard token instead of an SDK API key. The SDK authenticates against the
/v1API withAuthorization: Bearer <sdk-key>. Your Clerk dashboard session will not work. Create an SDK key in the app settings. - App ID mismatch. The App ID passed to
FlowPilotConfigurationmust be the app that owns the placement. If they differ, the resolve returns no flow and nothing shows. - Placement key typo, paused placement, or no flow attached. The key in your code must match the placement key exactly. A paused placement, or one with no flow attached, resolves to nothing.
- Forgetting to publish. A draft flow is not served. Publish a version and attach that version to the placement.
Troubleshooting
Nothing appears? Walk this checklist:- Is the API key valid and an SDK key (it starts with
fp_)? - Is the App ID the one that owns the placement?
- Is the placement active (not paused) and targeting iOS?
- Is a published flow version attached to the placement?
- Is the placement key in your code an exact match?
- Is the device online? If it may be offline, configure a cache or bundled fallback.