Feature Description
XcodeBuildMCP exposes simulator-level controls such as appearance, location, status bar overrides, keyboard settings, and hardware buttons, but it cannot currently change device orientation.
Rotating a selected simulator currently requires interacting with Simulator.app. There is no public simctl rotation command. UIWindowScene.requestGeometryUpdate only requests an orientation change for the calling app, so it cannot rotate an arbitrary simulator or SpringBoard.
Proposed MCP/CLI tool:
set_sim_orientation
orientation:
portrait
portrait-upside-down
landscape-left
landscape-right
The tool would target the selected simulator by UDID, wait for rotation to settle, invalidate the previous runtime snapshot, and return a refreshed snapshot. Screenshots captured after rotation should be returned upright.
A local prototype adds a small AXe command using its existing FBSimulatorControl dependency and FBSimulatorHIDEvent.deviceOrientation. It does not introduce another external dependency.
Use Cases
- Run landscape UI automation without using the Simulator.app menu.
- Refresh element coordinates and references before interacting after rotation.
- Capture correctly oriented screenshots after rotation.
- Target one simulator by UDID when multiple simulators are booted.
Example Interactions
You: Rotate the selected simulator to landscape left, tap Continue,
and take a screenshot.
AI:
1. Calls set_sim_orientation(landscape-left).
2. Uses the refreshed runtime snapshot to tap Continue.
3. Captures an upright landscape screenshot.
Prototype
The local prototype has been verified without a visible Simulator.app window:
- portrait → landscape left/right → portrait
- refreshed accessibility coordinates
- a successful element-reference tap after rotation
- corrected landscape screenshot dimensions
Open design questions:
- Should the tool belong to
ui-automation, simulator-management, or both workflows?
- Should screenshot correction be included in the initial change or handled separately?
If the approach is acceptable, I can submit the AXe command first, followed by the XcodeBuildMCP integration after an AXe release.
Feature Description
XcodeBuildMCP exposes simulator-level controls such as appearance, location, status bar overrides, keyboard settings, and hardware buttons, but it cannot currently change device orientation.
Rotating a selected simulator currently requires interacting with Simulator.app. There is no public
simctlrotation command.UIWindowScene.requestGeometryUpdateonly requests an orientation change for the calling app, so it cannot rotate an arbitrary simulator or SpringBoard.Proposed MCP/CLI tool:
The tool would target the selected simulator by UDID, wait for rotation to settle, invalidate the previous runtime snapshot, and return a refreshed snapshot. Screenshots captured after rotation should be returned upright.
A local prototype adds a small AXe command using its existing FBSimulatorControl dependency and
FBSimulatorHIDEvent.deviceOrientation. It does not introduce another external dependency.Use Cases
Example Interactions
Prototype
The local prototype has been verified without a visible Simulator.app window:
Open design questions:
ui-automation,simulator-management, or both workflows?If the approach is acceptable, I can submit the AXe command first, followed by the XcodeBuildMCP integration after an AXe release.