Platform

Configuration

Customize PipeKit to fit your app's needs.

Basic Configuration

Initialize PipeKit in your app entry point — the AppDelegate on iOS, or the Application subclass on Android:

AppDelegate.swift
import PipeKit
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
PipeKit.configure(
apiKey: "pk_live_your_api_key",
config: PipeKitConfig(
enableSessionReplay: true,
enableFlows: true,
captureNetwork: true,
captureConsoleLogs: true
)
)
return true
}

Configuration Options

These options are available on PipeKitConfig on both platforms (types shown as iOS / Android):

enableSessionReplayBool / Boolean

Enable session replay (video + logs + network capture).

Default: true

enableFlowsBool / Boolean

Enable dynamic flow composition and remote sync.

Default: true

captureNetworkBool / Boolean

Capture network requests including URL, method, status code, and timing.

Default: true

captureConsoleLogsBool / Boolean

Capture console / log output (print and os_log on iOS, Logcat on Android).

Default: true

Uploading Sessions

Sessions are captured locally and can be uploaded to the server. Inspect saved sessions and trigger an upload manually:

Upload.swift
// List sessions captured on the device
let sessions = PipeKit.getSavedSessions()
// Upload a specific session
PipeKit.uploadSession(sessionId: "session_id") { result in
switch result {
case .success(let response):
print("Uploaded: \(response.sessionId)")
case .failure(let error):
print("Failed: \(error)")
}
}

SwiftUI Configuration

For SwiftUI apps, initialize in your App struct:

YourApp.swift
import SwiftUI
import PipeKit
@main
struct YourApp: App {
init() {
PipeKit.configure(apiKey: "pk_live_your_api_key")
PipeKit.startSession()
}
var body: some Scene {
WindowGroup {
ContentView()
.trackScreen("Home")
}
}
}

Environment-based Configuration

Use different settings for development and production:

Environment.swift
#if DEBUG
let apiKey = "pk_test_development_key"
#else
let apiKey = "pk_live_production_key"
#endif
PipeKit.configure(apiKey: apiKey)

Tip: Use separate API keys

Create separate API keys for development and production in your dashboard. This keeps test sessions separate from real user data.

Next: Recording Sessions

Learn how to manually start/stop recording and control session behavior.

Continue to Recording →