Redaction is available from SDK version 0.6.0.
Mask a SwiftUI view
Add.candidRedacted() to the view. Place it after layout modifiers such as .padding() or .frame() so the mask covers the whole area.
Mask a UIKit view
CallCandid.setRedacted(true, for:) before the view displays sensitive content:
Best practices
- Mask every occurrence. If the same data appears in several places, mask each view.
- Mask containers to cover whole sections. Masking a container hides everything inside it.
- Use
.candidRedacted()for Candid recordings. Apple’s.privacySensitive()modifier serves a different purpose. - Review your recordings. Run a study on a physical device and watch the recording to confirm that every sensitive view is masked.