Simulator window doesn't rotate when setting XCUIDevice.shared.orientation

Originator:vytis.s.lt
Number:rdar://41005006 Date Originated:June 11 2018, 5:33 PM
Status:Closed Resolved:Yes
Product:Developer Tools Product Version:Xcode 10 b1
Classification: Reproducible:
 
Summary:
If during UI tests we change the orientation using XCUIDevice.shared.orientation API the simulator window stays in portrait. After the tests complete Springboard stays rotated

Steps to Reproduce:
1. Start simulator in portrait 
2. Have UI test that does XCUIDevice.shared.orientation = .landscapeLeft

Expected Results:
3. Simulator window should rotate to landscapeLeft

Actual Results:
3. Simulator window stays in portrait, but the app window inside is rotated. The orientation stays even after test is finished

Notes:
Attaching a sample project and screen recording of simulator in action

Comments

Apple Developer Relations

Do you have Hardware -> Rotate Device Automatically (in Simulator.app) enabled? Enabling that should have the effect you are looking for. If the issue persists with that on, please let us know.

By vytis.s.lt at June 12, 2018, 3:25 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!