get_active_run_destination
Retrieves the active run destination (device or simulator) for an Xcode project or workspace by reading the workspace state file without opening Xcode.
Instructions
Get the currently active run destination for a project.
Returns the device or simulator that Xcode will use for the next build or run operation. This reads from Xcode's workspace state file without opening the project in Xcode.
Note: After calling set_run_destination, Xcode may take several seconds to flush its state to disk. If called immediately after set_run_destination, this may return the previous destination.
Args: project_path: Path to an Xcode project (.xcodeproj) or workspace (.xcworkspace).
Returns: JSON with the active destination's name, platform, architecture, and id. Returns an error message if the active destination cannot be determined (e.g. the project has never been opened in Xcode).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |