Privacy & Masking
Protect sensitive user data and ensure compliance with privacy regulations.
Privacy by Default
PipeKit automatically masks common sensitive inputs like password fields and secure text entries. No configuration needed for basic privacy protection.
Automatic Masking
These elements are automatically masked (replaced with ●●●●) in recordings:
with isSecureTextEntry = true
Any field with textContentType = .password
Fields with textContentType = .creditCardNumber
Fields with textContentType = .oneTimeCode
Manual Masking
Mark additional views as sensitive to exclude them from recordings:
// Mark a specific view as sensitivelet sensitiveView = UIView()PipeKit.shared.markViewAsSensitive(sensitiveView)// Or use the extensionmySecretLabel.sr_markAsSensitive()// Mark in SwiftUIstruct ProfileView: View {var body: some View {Text(user.ssn).srSensitive() // This text will be masked}}
Mask by Class
Mask all instances of a specific view class:
// Mask all instances of a custom view classPipeKit.shared.addSensitiveClass(CreditCardView.self)PipeKit.shared.addSensitiveClass(BankAccountView.self)// Mask by class name (useful for third-party views)PipeKit.shared.addSensitiveClassName("PKPaymentButton")PipeKit.shared.addSensitiveClassName("StripeCardFormView")
Network Request Filtering
Filter sensitive data from network requests:
// Don't capture requests to certain URLsPipeKit.shared.addNetworkBlacklistPattern("/api/auth/.*")PipeKit.shared.addNetworkBlacklistPattern(".*stripe.com.*")// Remove sensitive headersPipeKit.shared.addSensitiveHeader("Authorization")PipeKit.shared.addSensitiveHeader("X-API-Key")// Filter request/response bodiesPipeKit.shared.setShouldCaptureRequestBody { request in// Don't capture bodies for auth endpointsreturn !request.url.path.contains("/auth/")}
Log Filtering
Filter sensitive information from captured logs:
// Filter logs containing sensitive patternsPipeKit.shared.addLogFilter { message in// Redact email addresseslet redacted = message.replacingOccurrences(of: "[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}",with: "[EMAIL REDACTED]",options: [.regularExpression, .caseInsensitive])return redacted}// Skip certain log messages entirelyPipeKit.shared.setShouldCaptureLog { message, level inreturn !message.contains("Bearer ")}
Disable Recording for Screens
Completely pause recording on sensitive screens:
class PaymentViewController: UIViewController {override func viewWillAppear(_ animated: Bool) {super.viewWillAppear(animated)// Pause recording on this screenPipeKit.shared.pauseRecording()}override func viewWillDisappear(_ animated: Bool) {super.viewWillDisappear(animated)// Resume recordingPipeKit.shared.resumeRecording()}}
GDPR & Compliance
User Consent
For GDPR compliance, get user consent before recording:
// Check consent before startingif UserDefaults.standard.bool(forKey: "userConsentedToRecording") {PipeKit.shared.startRecording()}// Show consent dialogfunc showRecordingConsentDialog() {let alert = UIAlertController(title: "Help us improve",message: "Allow us to record your session to improve the app?",preferredStyle: .alert)alert.addAction(UIAlertAction(title: "Allow", style: .default) { _ inUserDefaults.standard.set(true, forKey: "userConsentedToRecording")PipeKit.shared.startRecording()})alert.addAction(UIAlertAction(title: "Deny", style: .cancel))present(alert, animated: true)}
Data Retention
Sessions are automatically deleted after your plan's retention period (7-90 days). Users can request data deletion through your app, and you can delete specific sessions via the dashboard or API.
Next: API Reference
Explore all available SDK methods and integration options.
Continue to API Reference →