iOS Simulator: Screenshot
ios_simulator_screenshotCapture the iOS Simulator screen as an image, scaled to device point size so coordinates map directly to tap positions. Use with the UI tree to see exact labels and identifiers.
Instructions
Capture the screen and return it as an image. By default it is scaled to exactly the device's point size, which means a position read off this image can be passed straight to ios_simulator_tap with no conversion — the returned metadata says coordinateSpace: "points" when that holds. Pair it with ios_simulator_ui_tree rather than choosing between them: the image shows you what the screen looks like, the tree gives you exact labels and identifiers. Re-screenshot after every action rather than chaining blind taps.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | No | Which simulator: its UDID or its name as shown by ios_simulator_list. Omit it when exactly one is booted — that is the normal case, and IOS_SIMULATOR_ID pins it when it is not. Unlike simctl's own `booted`, this never picks arbitrarily between two. | |
| quality | No | JPEG quality 1-100. Flat interface screenshots stay perfectly legible at 70. | |
| save_path | No | Also write the full-resolution PNG to this absolute path, for attaching to a bug report. The returned image is still the downscaled one. | |
| max_dimension | No | Longest side of the returned image, in pixels. Leave it unset unless you have a reason: the default matches the device's point size, and any other value makes image positions stop being tap coordinates (the result then reports `coordinateSpace: "image_pixels"` and the `pointsPerPixel` factor to multiply by). |