SDK Reference
Complete API reference for the PipeKit SDK on iOS (Swift) and Android (Kotlin). All methods are called statically on the PipeKit type (a Swift enum on iOS, a Kotlin object on Android). Use the iOS / Android toggle on any code sample to switch languages.
import PipeKit // iOS SDK v0.6.0Configuration
Initialize PipeKit once on app launch. On iOS, do this in your AppDelegate or SwiftUI App.init().
Session Recording
Control session replay recording. Sessions capture video, touch events, logs, and network requests.
Session Management
Access and manage locally stored sessions.
Upload
Sessions auto-upload after being saved. You can also trigger uploads manually.
User Identification
Associate sessions with users in your system. User info is included in session metadata and visible in the dashboard.
Logging
Add custom log entries to the session. Logs appear in the activity timeline alongside network requests, synchronized with the replay.
Flows & Runtime Control
Register nodes with @Rewire and run flows composed of them. A node is a function that returns a plain value (dictionary, Bool, Double, String) on success and throws on failure — there is no result wrapper.
Feature Flags
Define feature flags in code and override them remotely. On iOS use the @PipeFlag property wrapper; on Android use the pipeFlag delegate.
Privacy & Sensitive Content
Mark views as sensitive to mask them in recordings. Masked views appear as solid rectangles in the captured video.
Config-driven masking (SessionReplayConfig)
Pass via PipeKitConfig(videoConfig:).
| Property | Type | Default | Description |
|---|---|---|---|
| maskSensitiveViews | Bool / Boolean | true | Respect .sensitiveContent() / .markAsSensitive() markers |
| autoMaskViewClasses | [String] / List<String> | [] | Class names to auto-mask (e.g. ["CreditCardInputView"]) |
Network redaction (SessionLoggerConfig)
Pass via PipeKitConfig(logConfig:).
| Property | Type | Default | Description |
|---|---|---|---|
| redactedHeaders | Set<String> | authorization, cookie, x-api-key, ... | Headers redacted from network capture (case-insensitive) |
| excludedURLPatterns | [String] / List<String> | [] | URL patterns to exclude from capture (regex) |
| maxBodySize | Int | 100 KB | Max request/response body size to capture |
| minimumLogLevel | LogLevel | .debug | Minimum log level to capture |
var video = SessionReplayConfig()video.maskSensitiveViews = truevideo.autoMaskViewClasses = ["MyCardView"]var logs = SessionLoggerConfig()logs.redactedHeaders.insert("x-custom-token")logs.excludedURLPatterns = [".*/auth/.*"]PipeKit.configure(apiKey: "pk_live_YOUR_KEY",config: PipeKitConfig(videoConfig: video, logConfig: logs))
UI Components (iOS)
The iOS SDK ships optional SwiftUI / UIKit helpers for building in-app session tooling. These are iOS-only — on Android, build your own UI with Jetpack Compose using the session APIs above.
| Component | Kind | Purpose |
|---|---|---|
| RecordingControlView | SwiftUI | Start/stop recording control with live status. |
| SessionsListView | SwiftUI | List of locally saved sessions with upload/delete actions. |
| SessionReplayViewer | SwiftUI | Play back a recorded session (video + timeline). |
| ActivityTimelineView | SwiftUI | Timeline of logs, network requests, and touches for a session. |
| LiveActivityView | SwiftUI | Live indicator shown while a session is recording. |
| MaskedView | UIKit | A UIView that is always masked in recordings. |
| TouchVisualizationView | UIKit | Renders touch indicators on captured frames. |
| SessionReplayDebugViewController | UIKit | Debug screen for inspecting recording state and saved sessions. |
Example: RecordingControlView() drops a ready-made start/stop control into any SwiftUI view.
Configuration Reference
PipeKitConfig
Top-level SDK configuration passed to PipeKit.configure(). On Android this type lives at com.pipekit.core.PipeKitConfig.
| Property | Type | Default | Description |
|---|---|---|---|
| enableSessionReplay | Bool / Boolean | true | Enable session replay (video + logs + network capture) |
| enableFlows | Bool / Boolean | true | Enable dynamic flow composition |
| enableFlags | Boolean | true | Enable @PipeFlag feature flags (Android) |
| enableRemoteSync | Boolean | true | Enable remote sync of flows/flags (Android) |
| captureNetwork | Bool / Boolean | true | Capture network requests |
| captureConsoleLogs | Bool / Boolean | true | Capture console logs |
| videoConfig | SessionReplayConfig | SessionReplayConfig() | Video / masking capture settings |
| logConfig | SessionLoggerConfig | SessionLoggerConfig() | Logging & network capture settings |
SessionReplayConfig
Video recording + masking settings. On Android this type lives at com.pipekit.replay.SessionReplayConfig.
| Property | Type | Default | Description |
|---|---|---|---|
| enableVideoRecording | Bool / Boolean | true | Record video frames (vs logs-only) |
| captureFrameRate | Int | 1 | Frames captured per second |
| captureTouches | Bool / Boolean | true | Record touch events |
| maskSensitiveViews | Bool / Boolean | true | Mask views marked sensitive |
| autoMaskViewClasses | [String] / List<String> | [] | Class names to auto-mask |
SessionLoggerConfig
Console + network capture settings. On Android this type lives at com.pipekit.replay.SessionLoggerConfig.
| Property | Type | Default | Description |
|---|---|---|---|
| minimumLogLevel | LogLevel | .debug / DEBUG | Minimum log level to capture |
| maxBodySize | Int | 100 KB | Max request/response body size to capture |
| redactedHeaders | Set<String> | authorization, cookie, ... | Headers redacted from network capture |
| excludedURLPatterns | [String] / List<String> | [] | URL patterns to exclude from capture (regex) |
Data Types
FlowResult
Returned by PipeKit.run().
| Property | Type | Default | Description |
|---|---|---|---|
| executionId | String | — | Unique id for this execution |
| flowName | String | — | Name of the executed flow |
| status | FlowStatus | — | success / failed |
| isSuccess | Bool / Boolean | — | Convenience: whether the flow succeeded |
| completedNodes | [String] / List<String> | — | Ids of nodes that completed |
| failedNodes | [(String,String)] / List<Pair> | — | (nodeId, errorMessage) pairs |
| duration / durationMillis | TimeInterval (iOS, s) / Long (Android, ms) | — | Execution time |
| context | FlowContext | — | Final context (read outputs via get/getRaw) |
SessionReplayData
An item from PipeKit.getSavedSessions().
| Property | Type | Default | Description |
|---|---|---|---|
| sessionId | String | — | Unique session id |
| startTime / endTime | Date (iOS) / String (Android) | — | Session start/end |
| durationMs | TimeInterval (iOS) / Double (Android) | — | Session duration (ms) |
| frameCount | Int | — | Number of captured frames |
| videoSegments | [String] / List<String> | — | Video segment file names |
| touches / logs / networkRequests | arrays | — | Captured touches, logs, and network entries |
| screenTransitions | array | — | trackScreen() events |
| metadata | SessionMetadata | — | Device/app metadata |
| userInfo | [String:String]? / Map? | nil | Identified user info |
LogLevel
Severity used by logging and minimumLogLevel.
| Property | Type | Default | Description |
|---|---|---|---|
| iOS | enum (String) | — | .debug, .info, .warning, .error |
| Android | enum | — | LogLevel.DEBUG, INFO, WARNING, ERROR |
Upload result
Returned by the upload APIs.
| Property | Type | Default | Description |
|---|---|---|---|
| SessionUploadResponse (iOS) | struct | — | sessionId, videoURL?, metadataURL?, message?, timestamp? |
| SessionUploader.Result (Android) | data class | — | statusCode: Int, body: String, success: Boolean |
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))// 2. Identify user (after login)PipeKit.identifyUser(userId: "user_12345",)// 3. Start recordingPipeKit.startSession()return true}}
Need Help?
Check out our guides for step-by-step setup or learn about privacy controls.
