Skip to content
TraceItX Docs
Documentation

Sensitive content

Mark it once, and it is masked in the screenshot and the replay before capture.

Updated

TraceItX.shared.markSensitive(cardNumberLabel)

Register the view once, on the main thread — in viewDidLoad, or wherever you build it. The SDK sets an associated tx_isSensitive marker on the view itself rather than keeping a registry, so marking does not retain the view and there is nothing to un-mark on teardown.

For views you build yourself, two equivalents: set view.tx_isSensitive = true directly, or make the container a TXSensitiveView. A sensitive view masks its whole subtree.

The masking happens in the producer, before capture — masked content never enters the screenshot buffer or the replay stream, let alone the upload. It is not a flag a viewer is trusted to honour.

SwiftUI

Reach the underlying view through a representable, or mark the hosting controller’s view when a whole screen is sensitive:

struct SensitiveMarker: UIViewRepresentable {
    func makeUIView(context: Context) -> UIView {
        let v = UIView()
        TraceItX.shared.markSensitive(v)
        return v
    }
    func updateUIView(_ uiView: UIView, context: Context) {}
}

Masking follows the view’s frame across layout changes rather than pinning a rectangle that goes stale when the keyboard appears or the device rotates.

What it covers

ScreenshotThe region is painted as a solid block.
Session replayNodes carry masked: true and paint as a block.
Console & networkNot covered — those are text streams. Use Redaction.

That last row is the one to remember: this is about pixels. A card number that also appears in a URLSession body needs a redaction rule as well.

Secure text fields

A UITextField with isSecureTextEntry is treated as sensitive automatically, so you do not need to mark it. Anything else that happens to hold a secret does.

Choosing what to mark

Mark the smallest view that contains the secret. Masking a whole screen makes the report useless without making it meaningfully safer, and a blanked screenshot is a common reason a report gets closed as unreproducible.