Frames rotated and shifted in landscape for iOS simulator

When I try to get the frames of a AXUIElementRef using AXUIElementCopyAttributeValue(element, (CFStringRef)attribute, &result) the frames are shifted and rotated on the iOS simulator.

I get the same frames when using the Accessibility Inspector when the Max is selected as the host.

When I switch the host to the iOS simulator the frames are correct.

How is the Accessibility Inspector getting the correct frames? And how can I do the same in my app?

Hello, the AXUIElement API is not supported for Simulator.app. If you'd like to interact with your app in Simulator, we recommend writing XCUITests and running them on the Simulator itself.

Frames rotated and shifted in landscape for iOS simulator
 
 
Q