Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach UIKit view hierarchy to events #1772

Closed
marandaneto opened this issue Apr 25, 2022 · 3 comments · Fixed by #2044
Closed

Attach UIKit view hierarchy to events #1772

marandaneto opened this issue Apr 25, 2022 · 3 comments · Fixed by #2044
Assignees

Comments

@marandaneto
Copy link
Contributor

marandaneto commented Apr 25, 2022

Description

Capture the view hierarchy and attach it to events. Can be sent as a text file via an attachment.

Related to #1560 and getsentry/sentry-java#1647

Solution brainstorm

https://github.com/indragiek/InAppViewDebugger does something similar, but according to @indragiek

Hey, if you're not interested in capturing the view as an image and only need the data structure then there's no real magic to it besides iterating the view tree recursively starting at some root view and collecting the metadata attributes you're looking for (probably stuff like class name, pointer address, etc.). If you want to capture what's on screen at any given moment you'd do something like this to figure out which window is key: https://stackoverflow.com/a/57169802. And then traverse the tree starting at that window (which inherits from UIView).

@romtsn
Copy link
Member

romtsn commented Apr 25, 2022

dupe of #1560? there's also a lib linked

@romtsn
Copy link
Member

romtsn commented Apr 25, 2022

Or I mean, we can literally ask @indragiek to help us out :D https://github.com/indragiek/InAppViewDebugger

@marandaneto
Copy link
Contributor Author

dupe of #1560? there's also a lib linked

Not really, related tho.
That one is SwiftUI-specific, but they should be linked for sure, thanks.

@philipphofmann philipphofmann changed the title Add Radiography integration Send View tree to Sentry Apr 26, 2022
@philipphofmann philipphofmann changed the title Send View tree to Sentry Attach view hierarchy to events Apr 26, 2022
@bruno-garcia bruno-garcia changed the title Attach view hierarchy to events Attach UIKit view hierarchy to events May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants