rotate
Set the target iOS Simulator or Android Emulator orientation to test layout in portrait, landscape, or upside-down modes.
Instructions
Set the device orientation.
Use when testing 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 on a TV target, or if the target device is not booted.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"udid": "<udid>",
"orientation": "<orientation>"
},
"name": "rotate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | Target device id from `list-devices` (iOS UDID or Android serial). | |
| orientation | Yes | Target orientation |