Platform

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.0

Configuration

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:).

PropertyTypeDefaultDescription
maskSensitiveViewsBool / BooleantrueRespect .sensitiveContent() / .markAsSensitive() markers
autoMaskViewClasses[String] / List<String>[]Class names to auto-mask (e.g. ["CreditCardInputView"])

Network redaction (SessionLoggerConfig)

Pass via PipeKitConfig(logConfig:).

PropertyTypeDefaultDescription
redactedHeadersSet<String>authorization, cookie, x-api-key, ...Headers redacted from network capture (case-insensitive)
excludedURLPatterns[String] / List<String>[]URL patterns to exclude from capture (regex)
maxBodySizeInt100 KBMax request/response body size to capture
minimumLogLevelLogLevel.debugMinimum log level to capture
PrivacyConfig.swift
var video = SessionReplayConfig()
video.maskSensitiveViews = true
video.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.

ComponentKindPurpose
RecordingControlViewSwiftUIStart/stop recording control with live status.
SessionsListViewSwiftUIList of locally saved sessions with upload/delete actions.
SessionReplayViewerSwiftUIPlay back a recorded session (video + timeline).
ActivityTimelineViewSwiftUITimeline of logs, network requests, and touches for a session.
LiveActivityViewSwiftUILive indicator shown while a session is recording.
MaskedViewUIKitA UIView that is always masked in recordings.
TouchVisualizationViewUIKitRenders touch indicators on captured frames.
SessionReplayDebugViewControllerUIKitDebug 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.

PropertyTypeDefaultDescription
enableSessionReplayBool / BooleantrueEnable session replay (video + logs + network capture)
enableFlowsBool / BooleantrueEnable dynamic flow composition
enableFlagsBooleantrueEnable @PipeFlag feature flags (Android)
enableRemoteSyncBooleantrueEnable remote sync of flows/flags (Android)
captureNetworkBool / BooleantrueCapture network requests
captureConsoleLogsBool / BooleantrueCapture console logs
videoConfigSessionReplayConfigSessionReplayConfig()Video / masking capture settings
logConfigSessionLoggerConfigSessionLoggerConfig()Logging & network capture settings

SessionReplayConfig

Video recording + masking settings. On Android this type lives at com.pipekit.replay.SessionReplayConfig.

PropertyTypeDefaultDescription
enableVideoRecordingBool / BooleantrueRecord video frames (vs logs-only)
captureFrameRateInt1Frames captured per second
captureTouchesBool / BooleantrueRecord touch events
maskSensitiveViewsBool / BooleantrueMask 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.

PropertyTypeDefaultDescription
minimumLogLevelLogLevel.debug / DEBUGMinimum log level to capture
maxBodySizeInt100 KBMax request/response body size to capture
redactedHeadersSet<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().

PropertyTypeDefaultDescription
executionIdStringUnique id for this execution
flowNameStringName of the executed flow
statusFlowStatussuccess / failed
isSuccessBool / BooleanConvenience: whether the flow succeeded
completedNodes[String] / List<String>Ids of nodes that completed
failedNodes[(String,String)] / List<Pair>(nodeId, errorMessage) pairs
duration / durationMillisTimeInterval (iOS, s) / Long (Android, ms)Execution time
contextFlowContextFinal context (read outputs via get/getRaw)

SessionReplayData

An item from PipeKit.getSavedSessions().

PropertyTypeDefaultDescription
sessionIdStringUnique session id
startTime / endTimeDate (iOS) / String (Android)Session start/end
durationMsTimeInterval (iOS) / Double (Android)Session duration (ms)
frameCountIntNumber of captured frames
videoSegments[String] / List<String>Video segment file names
touches / logs / networkRequestsarraysCaptured touches, logs, and network entries
screenTransitionsarraytrackScreen() events
metadataSessionMetadataDevice/app metadata
userInfo[String:String]? / Map?nilIdentified user info

LogLevel

Severity used by logging and minimumLogLevel.

PropertyTypeDefaultDescription
iOSenum (String).debug, .info, .warning, .error
AndroidenumLogLevel.DEBUG, INFO, WARNING, ERROR

Upload result

Returned by the upload APIs.

PropertyTypeDefaultDescription
SessionUploadResponse (iOS)structsessionId, videoURL?, metadataURL?, message?, timestamp?
SessionUploader.Result (Android)data classstatusCode: Int, body: String, success: Boolean

Full Example

AppDelegate.swift
import UIKit
import PipeKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// 1. Configure the SDK
PipeKit.configure(
apiKey: "pk_live_YOUR_KEY",
config: PipeKitConfig(
enableSessionReplay: true,
enableFlows: true
)
)
// 2. Identify user (after login)
PipeKit.identifyUser(
userId: "user_12345",
)
// 3. Start recording
PipeKit.startSession()
return true
}
}

Need Help?

Check out our guides for step-by-step setup or learn about privacy controls.