Skip to content

ref(apple): add notes on SwiftUI limitations#18352

Open
philprime wants to merge 1 commit into
masterfrom
philprime/swiftui-warning
Open

ref(apple): add notes on SwiftUI limitations#18352
philprime wants to merge 1 commit into
masterfrom
philprime/swiftui-warning

Conversation

@philprime

Copy link
Copy Markdown
Member

DESCRIBE YOUR PR

Clarifies that the SwiftUI-related limitations are not caused by the SDK, but by the operating system not offering data to us.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

@philprime philprime self-assigned this Jun 10, 2026
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Jun 10, 2026 8:43am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Jun 10, 2026 8:43am

Request Review

@codeowner-assignment codeowner-assignment Bot requested a review from a team June 10, 2026 08:33
Comment on lines +29 to +31
View hierarchy support for SwiftUI is highly limited, due to the SwiftUI rendering engine not backing every view with a UIKit view anymore.

For example, `Text` views may be rendered directly into a graphics render surface rather than creating a corresponding `UILabel`. This is an operating system limitation, not a limitation of the Sentry SDK. As a result, the captured view hierarchy may not fully represent the SwiftUI view tree.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: The documentation change to "highly limited" support for SwiftUI view hierarchies is misleading if the feature is completely unsupported, setting incorrect user expectations.
Severity: LOW

Suggested Fix

Revert the documentation to state that view hierarchies are "not supported for SwiftUI" to accurately reflect the feature's capability. If there is some partial support, the documentation should be more specific about what is and isn't captured, rather than using ambiguous terms like "highly limited".

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: docs/platforms/apple/common/enriching-events/viewhierarchy/index.mdx#L29-L31

Potential issue: The documentation in `index.mdx` is being updated from stating that
view hierarchies are "not supported for SwiftUI" to being "highly limited". This new
wording, particularly the phrase "the captured view hierarchy may not fully represent
the SwiftUI view tree," implies that some view hierarchy data is captured for SwiftUI
applications. However, evidence suggests the feature is completely unsupported for
SwiftUI. This discrepancy can mislead users into expecting partial functionality from
the `attachViewHierarchy` option, leading to confusion when no view hierarchy data is
actually captured.

Did we get this right? 👍 / 👎 to inform future reviews.

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.

1 participant