Skip to content

[Bug]: Docs/code mismatch: device list recommends --device-id, but device build rejects it #287

@loftiskg

Description

@loftiskg

Bug Description

The xcodebuildmcp device list output instructs users to run device build/test commands with a --device-id argument, but the xcodebuildmcp device build command does not actually accept that flag.

This makes the suggested next step unusable and creates confusion about how to target a specific connected device for builds.

Debug Output

N/A

Editor/Client

CLI

MCP Server Version

2.3.0

LLM

Sonnet

MCP Configuration

Steps to Reproduce

  1. Run:
xcodebuildmcp device list
  1. Observe the suggested next step:
xcodebuildmcp device build --scheme "SCHEME" --device-id "DEVICE_UDID"
  1. Run:
xcodebuildmcp device build --scheme "SCHEME" --device-id "DEVICE_UDID"

The command fails with:

Unknown arguments: device-id, deviceId

It then shows help output for device build, which does not list --device-id as a supported argument.

Expected Behavior

One of the following should be true:

  1. xcodebuildmcp device build should support --device-id, matching the guidance shown in device list, or
  2. device list should not instruct users to pass --device-id directly, and should instead clearly explain that the device must be set via session defaults first.

Actual Behavior

❯ xcodebuildmcp device list
Connected Devices:

✅ Available Devices:


📱 iPhone
   UDID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
   Model: iPhone16,1
   Product Type: iPhone16,1
   Platform: Unknown 26.3.1
   CPU Architecture: arm64e
   Connection: localNetwork
   Developer Mode: enabled

Note: Use the device ID/UDID from above when required by other tools.
Hint: Save a default device with session-set-defaults { deviceId: 'DEVICE_UDID' }.
Before running build/run/test/UI automation tools, set the desired device identifier in session defaults.

Next steps:
1. Build for device: xcodebuildmcp device build --scheme "SCHEME" --device-id "DEVICE_UDID"
2. Run tests on device: xcodebuildmcp device test --scheme "SCHEME" --device-id "DEVICE_UDID"
3. Get app path: xcodebuildmcp device get-app-path --scheme "SCHEME"

❯ xcodebuildmcp device build --scheme "SCHEME" --device-id "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
 device build

Build for device.

Tool Arguments:
      --project-path                                                                                            [string]
      --workspace-path                                                                                          [string]
      --scheme                                                                                       [string] [required]
      --configuration                                                                                           [string]
      --derived-data-path                                                                                       [string]
      --extra-args                                                                                               [array]
      --prefer-xcodebuild                                                                                      [boolean]

Session Defaults:
      --profile  Override the defaults profile for this command only                                            [string]

Output Options:
      --json    JSON object of tool args (merged with flags)                                                    [string]
      --output  Output format                                       [string] [choices: "text", "json"] [default: "text"]

Options:
  -h, --help     Show help                                                                                     [boolean]
  -v, --version  Show version number                                                                           [boolean]

Unknown arguments: device-id, deviceId

Error Messages

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions