FlowPilotSDK, and its one dependency (lottie-ios) is pulled in automatically.
The SDK is open source and published at
github.com/flowpilothq/flowpilot-ios-sdk. Add it straight from that URL with Swift Package Manager. The local-path method below is for contributors or anyone who wants to vendor a checkout.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
Add the package
- Git URL (Xcode)
- Local path
1
Open the package dialog
In Xcode, go to File -> Add Package Dependencies.
2
Enter the repository URL
Paste the FlowPilot iOS SDK repository URL, then choose a version rule (for example, Up to Next Major Version from
1.0.0).3
Add the product to your target
Select the FlowPilotSDK library product and add it to your app target. Xcode resolves the transitive
lottie-ios dependency for you.Package.swift entry:Import the SDK
Once the package is added, import it where you use it:Notes
- Deployment target. The SDK requires a minimum deployment target of iOS 15.0 (and macOS 12.0). If your app targets an older OS, raise the minimum, or FlowPilot will not link.
- Lottie comes for free. You do not add
lottie-iosyourself. SPM resolves it as a transitive dependency ofFlowPilotSDK. flowpilot-exportis not linked into your app. The package also ships a build-time executable (flowpilot-export) that snapshots a flow into an offline bundle. It is run withswift run, not added to your app target. See Offline and bundled flows.
Common mistakes
- Adding the wrong product to your target. The library product is
FlowPilotSDK. If you referenceflowpilot-export(the CLI) or a misspelled name, the build fails. - Deployment target below the SDK minimum. A target below iOS 15.0 will not resolve the package. Raise the app’s minimum deployment version.
- Adding
lottie-iosseparately. It is a transitive dependency. Adding it again by hand can cause duplicate-package conflicts.
Troubleshooting
- “Missing package product ‘FlowPilotSDK’”. Confirm you selected the
FlowPilotSDKlibrary product for your target, and that the package resolved without errors (File -> Packages -> Resolve Package Versions). - Package fails to resolve from a Git URL. Confirm the URL is exactly
https://github.com/flowpilothq/flowpilot-ios-sdk.gitand that your machine can reach GitHub. From a corporate network, check that GitHub is not blocked, or clone the repo and use the local-path method instead.