Skip to content

feat: enhance SentryUIRedactBuilder to support redaction of CALayer sublayers in iOS 26+#7781

Merged
itaybre merged 6 commits intomainfrom
itay/session_replay_layer_based_redacting
Apr 22, 2026
Merged

feat: enhance SentryUIRedactBuilder to support redaction of CALayer sublayers in iOS 26+#7781
itaybre merged 6 commits intomainfrom
itay/session_replay_layer_based_redacting

Conversation

@itaybre
Copy link
Copy Markdown
Contributor

@itaybre itaybre commented Apr 7, 2026

📜 Description

Add's SwiftUI layers for text and images to automatically redact content on iOS 26

💡 Motivation and Context

iOS 26 only uses layers for rendering SwiftUI content, thus our old logic broke and stopped masking text and images.

Fixes: #6390

💚 How did you test it?

Used our SwiftUI app with .sentryReplayPreviewMask(opacity: 0.5)

Example iOS 18 vs iOS 26
image

📝 Checklist

You have to check all boxes before merging:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • Enhance SentryUIRedactBuilder to support redaction of CALayer sublayers in iOS 26+ by itaybre in #7781
  • Track low power mode in device context by itaybre in #7777

Bug Fixes 🐛

  • (breadcrumbs) Unsubscribe to system event during background to avoid reporting breadcrumbs with wrong timestamps on return to foreground by denrase in #7803
  • (replay) Keep replayType as buffer for Session Replay triggered by an error by romtsn in #7804
  • Copy mutable collections before passing to scope observers by antonis in #7807
  • Detect development builds via provisioning profile entitlement by denrase in #7702

Internal Changes 🔧

Deps

  • Bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.25.2 to 2.25.4 by dependabot in #7811
  • Bump actions/create-github-app-token from 3.0.0 to 3.1.1 by dependabot in #7812
  • Bump ruby/setup-ruby from 1.299.0 to 1.302.0 by dependabot in #7813
  • Bump peter-evans/create-pull-request from 8.1.0 to 8.1.1 by dependabot in #7791
  • Bump actions/upload-artifact from 7.0.0 to 7.0.1 by dependabot in #7790
  • Bump actions/upload-pages-artifact from 4.0.0 to 5.0.0 by dependabot in #7789
  • Bump actions/github-script from 8.0.0 to 9.0.0 by dependabot in #7793

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 4115572

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.457%. Comparing base (f2e369d) to head (4115572).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #7781       +/-   ##
=============================================
+ Coverage   86.426%   86.457%   +0.030%     
=============================================
  Files          487       487               
  Lines        40013     40066       +53     
  Branches     18014     18031       +17     
=============================================
+ Hits         34582     34640       +58     
+ Misses        5380      5376        -4     
+ Partials        51        50        -1     
Files with missing lines Coverage Δ
...Core/Tools/ViewCapture/SentryUIRedactBuilder.swift 96.892% <100.000%> (+0.543%) ⬆️

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f2e369d...4115572. Read the comment docs.

@itaybre itaybre added the ready-to-merge Use this label to trigger all PR workflows label Apr 9, 2026
@sentry
Copy link
Copy Markdown

sentry Bot commented Apr 9, 2026

📲 Install Builds

iOS

🔗 App Name App ID Version Configuration
SDK-Size io.sentry.sample.SDK-Size 9.10.0 (1) Release

⚙️ sentry-cocoa Build Distribution Settings

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 9, 2026

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1235.51 ms 1263.98 ms 28.47 ms
Size 24.14 KiB 1.13 MiB 1.11 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
2df6337 1237.50 ms 1263.60 ms 26.10 ms
81f76c2 1216.40 ms 1253.76 ms 37.36 ms
b2f3bdd 1219.09 ms 1256.42 ms 37.33 ms
04540c5 1226.39 ms 1251.40 ms 25.02 ms
fe6228d 1215.81 ms 1234.04 ms 18.23 ms
a1a9260 1192.15 ms 1229.80 ms 37.64 ms
3bf0d3f 1202.12 ms 1237.23 ms 35.11 ms
60ea6f8 1209.42 ms 1246.62 ms 37.21 ms
a180235 1222.87 ms 1255.10 ms 32.23 ms
a8ec727 1217.78 ms 1253.26 ms 35.47 ms

App size

Revision Plain With Sentry Diff
2df6337 24.14 KiB 1.13 MiB 1.10 MiB
81f76c2 24.14 KiB 1.11 MiB 1.08 MiB
b2f3bdd 24.14 KiB 1.11 MiB 1.08 MiB
04540c5 24.14 KiB 1.11 MiB 1.09 MiB
fe6228d 24.14 KiB 1.11 MiB 1.08 MiB
a1a9260 24.14 KiB 1.08 MiB 1.06 MiB
3bf0d3f 24.14 KiB 1.04 MiB 1.02 MiB
60ea6f8 24.14 KiB 1.12 MiB 1.10 MiB
a180235 24.14 KiB 1.11 MiB 1.09 MiB
a8ec727 24.14 KiB 1.12 MiB 1.10 MiB

Previous results on branch: itay/session_replay_layer_based_redacting

Startup times

Revision Plain With Sentry Diff
c74729d 1209.42 ms 1241.16 ms 31.74 ms
4f76092 1213.18 ms 1234.17 ms 20.99 ms

App size

Revision Plain With Sentry Diff
c74729d 24.14 KiB 1.14 MiB 1.11 MiB
4f76092 24.14 KiB 1.13 MiB 1.11 MiB

@itaybre itaybre marked this pull request as ready for review April 20, 2026 20:56
Copy link
Copy Markdown
Member

@philprime philprime left a comment

Choose a reason for hiding this comment

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

LGTM

@itaybre itaybre enabled auto-merge (squash) April 22, 2026 13:53
@itaybre itaybre merged commit 61087a4 into main Apr 22, 2026
235 of 270 checks passed
@itaybre itaybre deleted the itay/session_replay_layer_based_redacting branch April 22, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix default masking of SwiftUI views in iOS 26 Liquid Glass

2 participants