SDK Reference
Complete API reference for the PipeKit iOS SDK. All methods are called as static functions on the PipeKit enum.
import PipeKitConfiguration
Initialize PipeKit once on app launch, typically in your AppDelegate or SwiftUI App.init().
Session Recording
Control session replay recording. Sessions capture video, touch events, logs, and network requests.
User Identification
Associate sessions with users in your system. User info is included in session metadata and visible in the dashboard.
Screen Tracking
Track screen transitions so you can correlate activity with the screen the user was on.
Logging
Add custom log entries to the session. Logs appear in the activity timeline alongside network requests, synchronized with the video replay.
Session Management
Access and manage locally stored sessions.
Upload
Sessions are automatically uploaded after being saved. You can also trigger uploads manually or control the auto-upload behavior.
Flows & Runtime Control
Build and run dynamic flows composed of registered nodes. Flows can be defined in code or pushed remotely from the dashboard.
Privacy & Sensitive Content
Mark views as sensitive to mask them in session recordings. Masked views appear as solid rectangles in the captured video. Text fields and secure entries are auto-masked by default.
Auto-Masking Options
These SessionReplayConfig properties control automatic masking behavior.
| Property | Type | Default | Description |
|---|---|---|---|
| maskSensitiveViews | Bool | true | Respect .sensitiveContent() and .markAsSensitive() markers |
| autoMaskTextFields | Bool | true | Automatically mask all UITextField content |
| autoMaskSecureTextFields | Bool | true | Automatically mask password/secure text fields |
| autoMaskViewClasses | [String] | [] | Class names to auto-mask (e.g. ["CreditCardInputView"]) |
| sensitiveViewMaskColor | Color | .gray | Color used for the mask overlay |
SwiftUI Integration
View modifiers and components for SwiftUI apps.
UIKit Integration
Base classes and utilities for UIKit apps.
Configuration Reference
PipeKitConfig
Top-level SDK configuration passed to PipeKit.configure().
| Property | Type | Default | Description |
|---|---|---|---|
| enableSessionReplay | Bool | true | Enable session replay (video + logs + network capture) |
| enableFlows | Bool | true | Enable dynamic flow composition and remote sync |
| captureNetwork | Bool | true | Capture network requests |
| captureConsoleLogs | Bool | true | Capture console logs |
| videoConfig | SessionReplayConfig | SessionReplayConfig() | Video capture settings (iOS only) |
| logConfig | SessionLoggerConfig | SessionLoggerConfig() | Logging capture settings (iOS only) |
SessionReplayConfig
Fine-grained control over video capture and session behavior.
| Property | Type | Default | Description |
|---|---|---|---|
| enableVideoRecording | Bool | true | Set to false for logs-only mode (no video) |
| captureFrameRate | Int | 1 | Frames per second (1-10). Higher = smoother but larger files |
| jpegCompressionQuality | CGFloat | 0.3 | JPEG quality (0.0 - 1.0) |
| captureScale | CGFloat | 1.0 | Scale factor for captured images |
| videoBitrate | Int | 75,000 | H.264 bitrate in bits/second |
| maxStorageSize | Int | 50 MB | Maximum local storage in bytes |
| segmentDuration | TimeInterval | 10.0 | Duration per video segment in seconds |
| captureTouches | Bool | true | Record touch events |
| showTouchIndicators | Bool | true | Render touch indicators on captured frames |
| autoStartOnLaunch | Bool | false | Auto-start recording on app launch |
| autoStopOnBackground | Bool | true | Auto-stop when app enters background |
| autoStopOnTerminate | Bool | true | Auto-stop and save on app termination |
| enableCrashRecovery | Bool | true | Save periodic checkpoints for crash recovery |
| crashRecoveryInterval | TimeInterval | 5.0 | Seconds between crash recovery checkpoints |
| storageDirectory | URL | Documents/SessionReplays | Directory for stored recordings |
| debugLogging | Bool | true | Print SDK debug logs to console |
SessionLoggerConfig
Control how console logs and network requests are captured.
| Property | Type | Default | Description |
|---|---|---|---|
| captureConsoleLogs | Bool | true | Capture print/os_log messages |
| captureNetworkRequests | Bool | true | Capture HTTP requests/responses |
| minimumLogLevel | LogLevel | .debug | Minimum log level to capture |
| maxLogMessageLength | Int | 2000 | Truncate messages longer than this |
| maxBodySize | Int | 100 KB | Max request/response body size to capture |
| redactedHeaders | Set<String> | authorization, cookie, ... | Headers redacted from network capture (case-insensitive) |
| excludedURLPatterns | [String] | [] | URL patterns to exclude from capture (regex) |
| excludeSDKLogs | Bool | true | Exclude [PipeKit] internal logs from session data |
Data Models
Key types you'll encounter when working with the SDK.
Full Example
import UIKitimport PipeKit@mainclass AppDelegate: UIResponder, UIApplicationDelegate {func application(_ application: UIApplication,didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {// 1. Configure the SDKPipeKit.configure(apiKey: "pk_live_YOUR_KEY",config: PipeKitConfig(enableSessionReplay: true,enableFlows: true,captureNetwork: true,captureConsoleLogs: true))// 2. Identify user (after login)PipeKit.identifyUser(userId: "user_12345",)// 3. Start recordingPipeKit.startSession()return true}func applicationDidEnterBackground(_ application: UIApplication) {// Sessions auto-stop on background by default// Auto-upload handles the rest}}
import SwiftUIimport PipeKit@mainstruct MyApp: App {init() {PipeKit.configure(apiKey: "pk_live_YOUR_KEY")PipeKit.startSession()}var body: some Scene {WindowGroup {ContentView().trackScreen("Home").withTouchIndicators()}}}struct PaymentView: View {@State private var cardNumber = ""var body: some View {VStack {TextField("Card Number", text: $cardNumber).sensitiveContent() // Masked in recordingsButton("Pay") {PipeKit.log("Payment initiated", attributes: ["amount": "49.99"])}}.trackScreen("Payment")}}
Need Help?
Check out our guides for step-by-step setup or learn about privacy controls.
