Skip to main content
Add FlowPilot to your app with Swift Package Manager (SPM). The package product is named FlowPilotSDK, and its one dependency (lottie-ios) is pulled in automatically.
The SDK is distributed privately to FlowPilot customers ahead of a public release. Your account team gives you either a local copy of the SDK or a Git URL for a private repository. Use whichever method below matches how the code was shared with you.

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

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 your account team gave you, then choose a version rule (for example, Up to Next Major Version from 1.0.0).
TODO: confirm the public SPM URL. The SDK is distributed privately today (see flowpilot-ios-sdk/README.md); the canonical public URL will be published once a public release is cut.
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.
The equivalent Package.swift entry:
dependencies: [
    // TODO: confirm the public SPM URL.
    .package(url: "<FlowPilot iOS SDK repo URL>", from: "1.0.0")
],
targets: [
    .target(
        name: "MyApp",
        dependencies: [
            .product(name: "FlowPilotSDK", package: "flowpilot-ios-sdk")
        ]
    )
]

Import the SDK

Once the package is added, import it where you use it:
import FlowPilotSDK

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-ios yourself. SPM resolves it as a transitive dependency of FlowPilotSDK.
  • flowpilot-export is 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 with swift 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 reference flowpilot-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-ios separately. It is a transitive dependency. Adding it again by hand can cause duplicate-package conflicts.

Troubleshooting

  • “Missing package product ‘FlowPilotSDK’”. Confirm you selected the FlowPilotSDK library 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 correct and your machine has access to the private repository. If you do not have a URL yet, use the local-path method instead.