Product Benefits Pricing Guides Docs About Contact us Try it out
Analytics tools

PostHog iOS Replay: SwiftUI Canvas Masking Check

PostHog iOS session replay masking now covers SwiftUI drawingGroup, Canvas and Charts. Audit what was recorded unmasked before 3.92.5.

· 3 min read

Session replay is only safe when masking is complete. If a screen draws sensitive content in a way the masker cannot see, that content is uploaded as plain pixels, and nobody notices until a privacy review or a user complaint.

PostHog iOS 3.92.5 closed one such gap. With maskAllTextInputs or maskAllImages enabled, content rendered through SwiftUI .drawingGroup() and Canvas is now masked in screenshot replays. Before this release it was uploaded unmasked. Swift Charts are masked too, and you can apply postHogNoMask() to a chart you want left visible. Release 3.92.6 then made ph-no-capture masks cover the full rectangle of a view, including corners and views that fill the window.

Data Points to Track

  • sdk_version: the PostHog iOS version on each recording, so you can separate pre and post 3.92.5 sessions
  • mask_all_text_inputs: whether the setting was on
  • mask_all_images: whether the setting was on
  • screen_name: the screen the recording shows
  • screen_uses_canvas: true if the screen uses Canvas, .drawingGroup() or Swift Charts
  • no_mask_override_count: number of views using postHogNoMask() or ph-no-capture
  • unmasked_review_status: reviewed, flagged or cleared
  • recording_count_affected: recordings made on older versions for those screens

Setup Steps

  1. Upgrade the PostHog iOS SDK to 3.92.6 or later.
  2. List every screen that uses Canvas, .drawingGroup() or Swift Charts. Balance charts, spending graphs and health plots are the usual suspects.
  3. Register the SDK version as a property on your recordings so you can filter by it.
  4. Open recent recordings from those screens that were captured on older versions and check for visible figures or labels.
  5. Delete or restrict any affected recordings according to your retention policy, and record the decision.
  6. Test masking on a debug build: open each screen, start a recording and confirm masked areas show as solid blocks.
  7. Review overrides. Every postHogNoMask() call should have a named reason, such as a public marketing chart.
  8. Add a check to release testing so new custom drawing views are verified before shipping.

Actionable Insights

If older recordings show real figures on chart screens, treat it as a data handling issue first and an analytics issue second. Involve whoever owns your privacy notice, because the retained pixels may be personal or financial data.

A high override count suggests masking is being switched off to make recordings easier to read. Check whether the reason is still valid, and prefer masking only the sensitive elements.

If a release shows more recordings flagged for review than usual, look for newly added custom drawing. Teams often adopt Canvas for performance and forget it behaves differently from standard views.

Finally, compare the replay volume before and after the upgrade. Masked content can make recordings less useful for diagnosing confusing charts, so you may need event data alongside replays.

Common Pitfalls

Do not assume a masking setting protects every view type. Treat each new rendering approach as untested until you have seen it in a recording. Also remember that masking applies at capture time, so it cannot fix recordings that already left the device.