Skip to content

fix: iOS26 SwiftUI masking cases#195

Merged
abelonogov-ld merged 10 commits into
mainfrom
andrey/labels-fix-ios26
May 8, 2026
Merged

fix: iOS26 SwiftUI masking cases#195
abelonogov-ld merged 10 commits into
mainfrom
andrey/labels-fix-ios26

Conversation

@abelonogov-ld
Copy link
Copy Markdown
Contributor

@abelonogov-ld abelonogov-ld commented May 5, 2026

Note

Medium Risk
Touches the session-replay masking pipeline (per-frame layer walk and privacy decisions), so regressions could expose or over-mask UI content, especially on iOS 26 SwiftUI screens. Changes are well-scoped and backed by new targeted tests but still affect core capture behavior.

Overview
Fixes SwiftUI masking on iOS 26 by changing session-replay masking to propagate .ldMask()/.ldUnmask()/.ldIgnore() via marker areas (projected overlay marker frames) instead of relying on UIKit ancestor relationships, and by adding support for SwiftUI content rendered as layer-only (no backing UIView).

Refactors MaskCollector into smaller collaborators (MarkerScanner, MaskingPolicy, MaskGeometry) and adds MaskView live-marker counting to skip the marker pre-pass when unused; mask “before/after” reconciliation is moved into a new MaskStabilizer. Adds extensive new propagation tests and updates the TestApp to exercise masking (e.g. enabling webview masking and adding .ldMask() examples).

Reviewed by Cursor Bugbot for commit 52db5f0. Bugbot is set up for automated code reviews on this repo. Configure here.

@abelonogov-ld abelonogov-ld requested a review from a team as a code owner May 5, 2026 00:28
Comment thread Sources/LaunchDarklySessionReplay/ScreenCapture/MaskCollector.swift Outdated
@abelonogov-ld abelonogov-ld force-pushed the andrey/labels-fix-ios26 branch from b7d7a75 to a999e55 Compare May 8, 2026 19:21
@abelonogov-ld abelonogov-ld changed the title WIP Fixing iOS26 masking fix: iOS26 SwiftUI masking cases May 8, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default mode and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a999e55. Configure here.

Comment thread Sources/LaunchDarklySessionReplay/ScreenCapture/MaskingPolicy.swift
@abelonogov-ld abelonogov-ld enabled auto-merge (squash) May 8, 2026 19:38
@abelonogov-ld abelonogov-ld merged commit 386d0ad into main May 8, 2026
6 checks passed
@abelonogov-ld abelonogov-ld deleted the andrey/labels-fix-ios26 branch May 8, 2026 19:45
abelonogov-ld added a commit that referenced this pull request May 22, 2026
* main:
  fix: iOS26 SwiftUI masking cases (#195)
  chore(main): release 0.34.1 (#197)
  fix(replay): propagate explicit mask/unmask state through view hierarchy (#196)
  chore(main): release 0.34.0 (#194)
  feat: Remove SwiftProtoBuf dependency (#193)
  docs: Readme Masking rules (#192)
abelonogov-ld pushed a commit that referenced this pull request May 23, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.35.0](0.34.1...0.35.0)
(2026-05-23)


### Features

* use only one animation flush and and only in case of existing masks
([#191](#191))
([2a09883](2a09883))


### Bug Fixes

* iOS26 SwiftUI masking cases
([#195](#195))
([386d0ad](386d0ad))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants