From e23cdc601e1bfd910e401b35f14d55930972a244 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 12 Feb 2024 10:01:51 +0100 Subject: [PATCH] fix(apple):No screenshot and view hierarchy for app hangs (#9079) * fix(apple):No screenshot and view hierarchy for app hangs * Apply suggestions from code review Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com> --------- Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com> --- .../apple/common/enriching-events/screenshots/index.mdx | 4 ++++ .../apple/common/enriching-events/viewhierarchy/index.mdx | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/platforms/apple/common/enriching-events/screenshots/index.mdx b/docs/platforms/apple/common/enriching-events/screenshots/index.mdx index 2fd5032eeefe7..4a33135a38013 100644 --- a/docs/platforms/apple/common/enriching-events/screenshots/index.mdx +++ b/docs/platforms/apple/common/enriching-events/screenshots/index.mdx @@ -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. + +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. + + ## Enabling Screenshots Screenshots may contain PII and is an opt-in feature. You can enable it as shown below: diff --git a/docs/platforms/apple/common/enriching-events/viewhierarchy/index.mdx b/docs/platforms/apple/common/enriching-events/viewhierarchy/index.mdx index f53126a23b7f7..4afdca5aca672 100644 --- a/docs/platforms/apple/common/enriching-events/viewhierarchy/index.mdx +++ b/docs/platforms/apple/common/enriching-events/viewhierarchy/index.mdx @@ -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. + +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. + + 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.