Skip to content

Commit

Permalink
fix(apple):No screenshot and view hierarchy for app hangs (#9079)
Browse files Browse the repository at this point in the history
* fix(apple):No screenshot and view hierarchy for app hangs

* Apply suggestions from code review

Co-authored-by: vivianyentran <[email protected]>

---------

Co-authored-by: vivianyentran <[email protected]>
  • Loading branch information
brustolin and vivianyentran committed Feb 12, 2024
1 parent 6995e5e commit e23cdc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ When a user experiences an error, an exception or a crash, Sentry provides the a

This feature only applies to SDKs with a user interface, such as the ones for mobile and desktop applications. In some environments like native iOS, taking a screenshot requires the UI thread and in the event of a crash, that might not be available. Another example where a screenshot might not be available is when the event happens before the screen starts to load. So inherently, this feature is a best effort solution.

<Note>
App hang events will not have a screenshot because the main thread is blocked and Sentry can't interact with UI elements in a background view.
</Note>

## Enabling Screenshots

Screenshots may contain <PlatformLink to="/data-management/sensitive-data/">PII</PlatformLink> and is an opt-in feature. You can enable it as shown below:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Sentry makes it possible to render a JSON representation of the view hierarchy o

This feature only applies to SDKs with a user interface, such as the ones for mobile and desktop applications. In some environments like native iOS, rendering the view hierarchy requires the UI thread and in the event of a crash, that might not be available. Another example where the view hierarchy might not be available is when the event happens before the screen starts to load. So inherently, this feature is a best effort solution.

<Note>
App hang events will not have view hierarchy because the main thread is blocked and Sentry can't interact with UI elements in a background view.
</Note>

<Note>

Deobfuscation for view hierarchies is fully supported for native SDKs, and React Native, but is currently not supported for Flutter. View hierarchies are not supported for SwiftUI.
Expand Down

0 comments on commit e23cdc6

Please sign in to comment.