Skip to content

Commit 7103ba9

Browse files
authored
feat(Apple): reportAccessibilityIdentifier option (getsentry#10923)
Added information about new reportAccessibilityIdentifier option
1 parent a6f176b commit 7103ba9

File tree

1 file changed

+24
-1
lines changed
  • docs/platforms/apple/common/enriching-events/viewhierarchy

1 file changed

+24
-1
lines changed

docs/platforms/apple/common/enriching-events/viewhierarchy/index.mdx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,29 @@ View hierarchy debugging is an opt-in feature. You can enable it as shown below:
3030

3131
<PlatformContent includePath="enriching-events/attach-viewhierarchy" />
3232

33+
## Privacy In View Hierarchy Attachments
34+
35+
Sentry doesn't collect any user information (such as UILabel and UITextView text) with the view hierarchy attachment, which only contains structure and properties.
36+
37+
If you're using the view's `accessibilityIdentifier` property with personal information, make sure to disable `accessibilityIdentifier` reporting like in the example below:
38+
39+
```swift {tabTitle:Swift}
40+
import Sentry
41+
SentrySDK.start { options in
42+
options.attachViewHierarchy = true
43+
options.reportAccessibilityIdentifier = false
44+
}
45+
```
46+
47+
```objc {tabTitle:Objective-C}
48+
@import Sentry;
49+
[SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
50+
options.attachViewHierarchy = YES;
51+
options.reportAccessibilityIdentifier = NO;
52+
}];
53+
```
54+
55+
3356
## Viewing View Hierarchy Attachments
3457
3558
View hierarchies appear in the "Attachments" tab, where you can view all attachments, as well as associated events. Click the event ID to open the [Issue Details](/product/issues/issue-details) page of that specific event.
@@ -38,4 +61,4 @@ View hierarchies appear in the "Attachments" tab, where you can view all attachm
3861
3962
On the **Issue Details** page, you can interact with the view hierarchy attachment in a section called "View Hierarchy". This section represents the state of your application at the time of an error event. There are three displays: a tree view, wireframe, and detailed view for a selected node. You can select nodes in either the tree or the wireframe to view the properties collected by the SDK. The SDK will report on the following keys for each node in the view: `alpha`, `visible`, `x`, `y`, `width`, `height`, `type`, and `identifier` if applicable, but there may be additional values specific to the SDK. This feature can be used as an exploratory tool to debug layout issues, visualize unnecessarily rendered content, or gain a better understanding of the relationship between views.
4063
41-
<Include name="common-imgs/viewhierarchy-example" />
64+
<Include name="common-imgs/viewhierarchy-example" />

0 commit comments

Comments
 (0)