Skip to content

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

Draft
itaybre wants to merge 2 commits intomainfrom
itay/session_replay_layer_based_redacting
Draft

feat: enhance SentryUIRedactBuilder to support redaction of CALayer sublayers in iOS 26+#7781
itaybre wants to merge 2 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
  • Implement strict trace continuation by antonis in #7705

Bug Fixes 🐛

  • (replay) Scope clipOut masking to active clip bounds by denrase in #7780

Internal Changes 🔧

Deps

  • Bump addressable from 2.8.9 to 2.9.0 by dependabot in #7783
  • Update clang-format version by sentry-mobile-updater in #7782
  • Bump mikepenz/action-junit-report from 6.3.1 to 6.4.0 by dependabot in #7773
  • Bump ruby/setup-ruby from 1.298.0 to 1.299.0 by dependabot in #7772
  • Bump fastlane-plugin-sentry from 2.5.0 to 2.5.1 by dependabot in #7771

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Fails
🚫 Please consider adding a changelog entry for the next release.
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Features

- enhance SentryUIRedactBuilder to support redaction of CALayer sublayers in iOS 26+ ([#7781](https://github.com/getsentry/sentry-cocoa/pull/7781))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 1844107

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
4669 2 4667 28
View the top 3 failed test(s) by shortest run time
SentryTests.SentryCrashInstallationReporterTests::testReportIsSentAndDeleted
Stack Traces | 0s run time
.../SentryTests/SentryCrash/SentryCrashInstallationReporterTests.swift:23 - XCTAssertEqual failed: ("Optional(0)") is not equal to ("Optional(1)")
SentryTests.SentryLayerRedactionTests::testRedact_layerOnlySublayer_producesRedactType_notRedactSwiftUI
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:177 - XCTAssertEqual failed: ("0") is not equal to ("1") - Layer-only sublayers should produce .redact regions
SentryTests.SentryLayerRedactionTests::testRedact_layerOnlySublayer_shouldRedact
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:112 - XCTAssertEqual failed: ("0") is not equal to ("1")

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@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

Sentry Build Distribution

App Name App ID Version Configuration Install Page
SDK-Size io.sentry.sample.SDK-Size 9.9.0 (1) Release Install Build

Configure 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 1213.18 ms 1234.17 ms 20.99 ms
Size 24.14 KiB 1.13 MiB 1.11 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
4d1f3fb 1217.77 ms 1253.84 ms 36.08 ms
f84c826 1216.38 ms 1241.98 ms 25.60 ms
ee272e8 1210.98 ms 1245.10 ms 34.12 ms
2c4362a 1231.50 ms 1255.95 ms 24.45 ms
5b1e2a1 1217.63 ms 1245.49 ms 27.86 ms
bffd360 1218.16 ms 1249.86 ms 31.70 ms
3060db6 1229.84 ms 1257.53 ms 27.70 ms
5d67f5d 1225.33 ms 1262.76 ms 37.43 ms
e701dc8 1215.89 ms 1254.06 ms 38.17 ms
a8ec727 1225.29 ms 1259.59 ms 34.30 ms

App size

Revision Plain With Sentry Diff
4d1f3fb 24.14 KiB 1.13 MiB 1.10 MiB
f84c826 24.14 KiB 1.04 MiB 1.02 MiB
ee272e8 24.14 KiB 1.10 MiB 1.08 MiB
2c4362a 24.14 KiB 1.07 MiB 1.04 MiB
5b1e2a1 24.14 KiB 1.11 MiB 1.09 MiB
bffd360 24.14 KiB 1.11 MiB 1.09 MiB
3060db6 24.14 KiB 1.12 MiB 1.10 MiB
5d67f5d 24.14 KiB 1.06 MiB 1.04 MiB
e701dc8 24.14 KiB 1.06 MiB 1.04 MiB
a8ec727 24.14 KiB 1.12 MiB 1.10 MiB

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

1 participant