Skip to content

fix(ios): Honor Sentry.Mask in error screenshots - #6974

Merged
antonis merged 3 commits into
mainfrom
fix/ios-screenshot-sentry-mask
Oct 30, 2026
Merged

antonis merged 3 commits into
mainfrom
fix/ios-screenshot-sentry-mask

Conversation

@antonis

@antonis antonis commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

This PR adds RNSentryReplayMask to options.screenshot.maskedViewClasses in RNSentryStart. The whole wrapper is masked, which covers its children the same way the replay mask container does. Any maskedViewClasses the user passes are kept.

💡 Motivation and Context

Fixes #6970

💚 How did you test it?

  • Added RNSentryStartTests cases
  • Verified in the RN sample (Sentry link)

📝 Checklist

  • I added tests to verify 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.
  • All tests passing.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.
  • No breaking changes.

🔮 Next steps

antonis and others added 2 commits October 30, 2026 07:59
Register RNSentryReplayMask as a masked view class for screenshots so
<Sentry.Mask> is masked in JS error screenshots, the same as in Session
Replay. The native SDK only lets hybrid SDKs set the mask container class
on the replay photographer, not the screenshot one.

Fixes #6970

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

⚪ None (no version bump detected)

📋 Changelog Preview

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


  • fix(ios): Honor Sentry.Mask in error screenshots by antonis and claude in #6974
  • fix(android): Restore enableLogs option mapping by antonis and claude in #6967
  • chore(deps): update Wizard to v9.1.0 by github-actions in #6972
  • chore(deps): update Sentry Android Gradle Plugin to v6.25.0 by github-actions in #6971

🤖 This preview updates automatically when you update the PR.

Comment thread packages/core/ios/RNSentryStart.m Resolved

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 7218536. Configure here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@antonis antonis added the ready-to-merge Triggers the full CI test suite label Oct 30, 2026
@sentry

sentry Bot commented Oct 30, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
Sentry RN io.sentry.reactnative.sample 8.33.0 (113) Release

⚙️ sentry-react-native Build Distribution Settings

@antonis
antonis marked this pull request as ready for review October 30, 2026 07:25
@antonis
antonis requested review from a team and lucas-zimerman as code owners October 30, 2026 07:25
@antonis
antonis requested review from alwx and buenaflor and removed request for a team October 30, 2026 07:25
@antonis
antonis merged commit 84b030c into main Oct 30, 2026
135 of 142 checks passed
@antonis
antonis deleted the fix/ios-screenshot-sentry-mask branch October 30, 2026 10:15
antonis added a commit that referenced this pull request Nov 26, 2026
* chore(tooling): Add verify-pr skill for on-device PR verification

Adds a local skill that verifies a PR end to end on an Android emulator:
build the sample without and with the change, drive it with Maestro, find
both runs' events in sentry-sdks through the Sentry MCP, and write a draft
before/after report.

The sample tags events with verify.pr, verify.commit and verify.run_id
when launched with matching launch arguments, and does nothing otherwise.
It also enables logs in sentry.options.json, so native Android matches the
JS enableLogs setting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(tooling): Write verify-pr scenarios per run, not into the skill

Scenarios were one-off per PR and nothing runs them, so a shared folder
would grow and rot. Move the #7087 flow to flows/examples/ as the worked
example and regression check, write each run's flow next to its report,
and promote to flows/steps/ only when a second run needs it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(tooling): Add iOS simulator support to the verify-pr skill

From verifying #7087 and #6974 on the iOS simulator: Pods setup and the
files pod install rewrites, the iOS init path, Maestro differences (no
`back`, tab icons and the Playground tab need ids), reading screenshot
attachments back from Sentry, and a two-color probe for masking checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(tooling): Fold iOS acceptance-run findings into verify-pr

Save the revert as a patch file, compare dist/ against packages/core/src,
define verify.commit for both sides, reinstall Pods every iOS run, shut
down booted devices, and keep attachment URLs out of reports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(sample): Add a screenshot masking probe to the Playground tab

A two-color view inside the existing <Sentry.Mask> demo, plus a button
that captures an exception with the demo on screen. The view is neither
text nor an image, so only <Sentry.Mask> can hide it in the event's
screenshot; a masked probe is one flat color. Used to verify #6974.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(tooling): Add a pre-build gate and open-PR handling to verify-pr

From running the skill on open PRs (#7042, #7030): a "Not verifiable this
way" verdict decided before any build (build-only claims, triggers a
simulator can't produce, native APIs missing from the pinned SDK, low
disk), guidance for feature PRs and open PRs, checks for node_modules,
run tagging and spec codegen, release builds by default, and evidence
for replay recording content and JS-thread blocks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Triggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS: JS error screenshots ignore <Sentry.Mask> when screenshot.maskAllText is false

2 participants