rotate
Changes the simulator or emulator device orientation to Portrait, LandscapeLeft, LandscapeRight, or PortraitUpsideDown. Use it to test how your app's layout adapts to different screen orientations.
Instructions
Set the device orientation to Portrait, LandscapeLeft, LandscapeRight, or PortraitUpsideDown.
Use to test layout in a different orientation. Re-run describe afterwards — frame coordinates change with the orientation.
On an unfolded foldable iOS simulator (the iPhone Duo), the value sets the orientation of the device, not of the UI: Portrait gives a landscape UI and LandscapeLeft gives a portrait UI. To fold or unfold the device, use fold.
Returns { orientation }. Fails if the target device is not booted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | Target device id from `list-devices` (iOS UDID or Android serial). | |
| orientation | Yes | Target orientation |