fold
Set a foldable iPhone simulator's hinge to a posture or angle (0-180°), returning when the device is ready for the next tap.
Instructions
Move the hinge of a foldable iOS simulator (the iPhone Duo) to a posture (closed, half-open, open) or to an angle (0-180°). The tool returns when the device accepts input again, so the next tap lands.
Use when you must see or test an app in a different posture: closed shows the cover panel, half-open and open show the inner panel. list-devices marks foldable simulators with foldable: true. To turn a device without a fold, use rotate.
All tools use the active panel (the panel that shows the UI), also after a fold made outside argent. The coordinates and the screenshot size change with the panel. Before you tap, read the element tree in this result or run describe again. Unfolded, the UI is landscape, as on a rotated iPhone.
A fold between two angles that are not closed or open can keep the current panel. To change panels, fold to closed or open.
Returns { activeScreen, screen: { id, panel, width, height }, posture?, hingeAngle, warning? }. screen names the active panel and gives its size in pixels. posture is set only at 0°, 120° and 180°. warning is set when argent cannot find the active panel, or when the device did not change to the expected panel.
Fails if the device is not foldable or is a remote simulator.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | Target device id from `list-devices` (a foldable iOS simulator UDID). | |
| angle | No | The hinge angle in degrees, 0 (closed) to 180 (open). Exactly one of `posture` and `angle`. | |
| posture | No | Where to move the hinge: `closed` (0°, the cover panel), `half-open` (120°) or `open` (180°, the inner panel). Exactly one of `posture` and `angle`. |