Installation
Add PipeKit to your iOS or Android project. Use the iOS / Android toggle on any code sample to switch platforms.
Requirements
- iOS 16.0+
- Xcode 15.0+
- Swift 5.9+
- Apple Silicon Mac (M1 or later) for building
1Download the SDK
Download the latest release (v0.6.0) containing the XCFramework and the macro binary.
Contains PipeKitSDK.xcframework and Macros/PipeKitMacros
2Add the XCFramework
- aUnzip the downloaded file
- bDrag
PipeKitSDK.xcframeworkinto your Xcode project - cIn your target's
General → Frameworks, Libraries, and Embedded Content, ensure it's listed withEmbed & Sign
3Add the Macro Binary
- aCopy the
Macrosfolder from the zip into your project root (next to your.xcodeproj) - bYou should have:
YourProject/Macros/PipeKitMacros
The macro binary runs at compile time only — it does not get bundled into your app. Do not add it to any Xcode target.
4Configure the Build Flag
In your app target's Build Settings, find Other Swift Flags (under Swift Compiler — Custom Flags) and add two separate entries using the + button:
-load-plugin-executable$(SRCROOT)/Macros/PipeKitMacros#PipeKitMacros
These must be two separate lines
Click the + button in Xcode to add each entry individually. If you paste them as a single combined string, you'll get a Driver threw unknown argument error.
5Import and Use
Import PipeKit in any file where you want to use it:
import SwiftUIimport PipeKitstruct ContentView: View {@PipeFlag var isEnabled = falsevar body: some View {Text(isEnabled ? "Feature ON" : "Feature OFF")}}
Troubleshooting
Driver threw unknown argument
The two flags are combined into a single string. Open Build Settings → Other Swift Flags and make sure -load-plugin-executable and the path are on separate lines.
No such file or directory
The macro binary is not at the expected path. Verify Macros/PipeKitMacros exists in your project root (the directory containing your .xcodeproj). Also ensure the file has execute permission: chmod +x Macros/PipeKitMacros
plugin for module 'PipeKitMacros' not found
The build flag is missing or incorrect. Double-check that both entries are in Other Swift Flags and the path matches where you placed the binary.
Next: Initialize the SDK
Now that you've installed the SDK, let's configure it in your app.
Continue to Configuration →