Is it possible to dump / introspect my own Accessibility tree at runtime (SwiftUI)?

Hi,

I’m working on a SwiftUI iOS app and I’d like to inspect / dump my own app’s accessibility structure (AX tree) at runtime, ideally on real devices.

By “AX tree” I mean the resolved accessibility hierarchy the system uses (labels, values, traits, identifiers, frames, parent/child relationships), similar to what Accessibility Inspector or simulator automation tools show.

Questions:

1. Is there any public / supported API that allows an app to read its own accessibility tree at runtime?

2. If not, why is this not exposed? (privacy, security, architectural reasons?)

3. What is the recommended alternative for debugging accessibility in production-safe ways?

•	UI tests (XCUITest)? (its works only debug mod :( )

•	Custom in-app debug tooling?

Thanks!

Last I tried it was possible even for other apps.
AXUIElementCreateSystemWide(), AXUIElementCreateApplication(pid), etc.

Note, this is not quite Swift question, you'd get better help on Apple's dev forums or stack overflow.