Skip to content

[Bug]: xcodebuild running -config Debug even if configuration is provided in parameters #30

@bryan1anderson

Description

@bryan1anderson

Bug Description

We have to use custom Xcode configurations aside from the regular Debug and Release
Even if "configuration" is specified xcodebuild does not run -config "Prod Debug"

Executing clean: /usr/bin/xcodebuild -project MyProj.xcodeproj -scheme Dev -skipMacroValidation -destination platform=iOS Simulator,id=60846422-58CE-4C79-A103-573AF35257CA build -config Debug clean

I can successfully manually run xcodemake:
xcodemake -project MyProj.xcodeproj -scheme Prod -config "Prod Debug" build

but when the MCP calls it, it always runs -config Debug and thus fails

Debug Output

bryananderson@Bryans-MacBook-Pro-M4-Max ios % # Run the diagnostic tool using mise
mise x npm:xcodebuildmcp@1.4.0-beta.1 -- xcodebuildmcp-diagnostic
zsh: command not found: #
Running XcodeBuildMCP Diagnostic Tool (v1.4.0-beta.1)...
Collecting system information and checking dependencies...

[2025-05-06T21:26:13.954Z] [INFO] [Diagnostic]: Running diagnostic tool
[2025-05-06T21:26:14.229Z] [INFO] Executing command: which xcodemake
[2025-05-06T21:26:14.233Z] [DEBUG] xcodemake found in PATH

XcodeBuildMCP Diagnostic Report

Generated: 2025-05-06T21:26:14.234Z
Server Version: 1.4.0-beta.1

System Information

  • platform: darwin
  • release: 24.4.0
  • arch: arm64
  • cpus: 16 x Apple M4 Max
  • memory: 64 GB
  • hostname: Bryans-MacBook-Pro-M4-Max.local
  • username: bryananderson
  • homedir: /Users/bryananderson
  • tmpdir: /var/folders/s4/t0cgq9fd0k94kvjpnzdn5kp00000gn/T

Node.js Information

  • version: v23.11.0
  • execPath: /opt/homebrew/Cellar/node/23.11.0/bin/node
  • pid: 74376
  • ppid: 62497
  • platform: darwin
  • arch: arm64
  • cwd: /Users/bryananderson/Developer/MyApp/ios
  • argv: /opt/homebrew/Cellar/node/23.11.0/bin/node /Users/bryananderson/.local/share/mise/installs/npm-xcodebuildmcp/1.4.0-beta.1/bin/xcodebuildmcp-diagnostic

Xcode Information

  • version: Xcode 16.3 - Build version 16E140
  • path: /Applications/Xcode.app/Contents/Developer
  • selectedXcode: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
  • xcrunVersion: xcrun version 70.

Dependencies

  • idb: ✅ Available (version info not available)
  • idb_companion: ✅ {"build_time":"08:41:50","build_date":"Aug 12 2022"}
  • python3: ✅ Python 3.13.3
  • pip3: ✅ pip 25.1.1 from /opt/homebrew/lib/python3.11/site-packages/pip (python 3.11)
  • xcodemake: ✅ Available (version info not available)
  • mise: ✅ 2025.5.1 macos-arm64 (2025-05-05)

Environment Variables

  • XCODEBUILDMCP_DEBUG: true
  • INCREMENTAL_BUILDS_ENABLED: 1
  • XCODEBUILDMCP_RUNNING_UNDER_MISE: (not set)
  • DEVELOPER_DIR: (not set)
  • HOME: /Users/bryananderson
  • USER: bryananderson
  • TMPDIR: /var/folders/s4/t0cgq9fd0k94kvjpnzdn5kp00000gn/T/
  • NODE_ENV: (not set)
  • SENTRY_DISABLED: (not set)

PATH

/Users/bryananderson/.local/share/mise/installs/npm-xcodebuildmcp/1.4.0-beta.1/bin
/Applications/Postgres.app/Contents/Versions/latest/bin
/Users/bryananderson/.local/bin
/opt/homebrew/lib/ruby/gems/3.4.0/bin
/opt/homebrew/opt/ruby/bin
/opt/homebrew/opt/rustup/bin
/Users/bryananderson/Developer/flutter/bin
/opt/homebrew/Caskroom/miniconda/base/condabin
/opt/homebrew/Cellar/dart-sdk/3.5.3/libexec/bin/
/opt/homebrew/bin
/opt/homebrew/sbin
/usr/local/bin
/System/Cryptexes/App/usr/bin
/usr/bin
/bin
/usr/sbin
/sbin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
/Library/Apple/usr/bin
/opt/homebrew/Cellar/dart-sdk/3.5.3/libexec/bin/
/usr/local/bin
/Users/bryananderson/.pub-cache/bin
/Users/bryananderson/.cache/lm-studio/bin

Feature Status

UI Automation (idb)

  • Available: ✅ Yes
  • UI Automation Supported: ✅ Yes

Incremental Builds

  • Enabled: ✅ Yes
  • Available: ✅ Yes
  • Makefile exists: ✅ Yes

Mise Integration

  • Running under mise: ❌ No
  • Mise available: ✅ Yes

Tool Availability Summary

  • Build Tools: ✅ Available
  • UI Automation Tools: ✅ Available
  • Incremental Build Support: ✅ Available & Enabled

Sentry

  • Sentry enabled: ✅ Yes

Troubleshooting Tips

  • If UI automation tools are not available, install idb: pip3 install fb-idb
  • If incremental build support is not available, you can download the tool from https://github.com/cameroncooke/xcodemake. Make sure it's executable and available in your PATH
  • To enable xcodemake, set environment variable: export INCREMENTAL_BUILDS_ENABLED=1
  • For mise integration, follow instructions in the README.md file

Diagnostic complete. Please include this output when reporting issues.
bryananderson@Bryans-MacBook-Pro-M4-Max ios %

Editor/Client

Cursor 0.49.6

MCP Server Version

1.4.0-beta.1

LLM

Claude 3.6

MCP Configuration

{
  "mcpServers": {
    "XcodeBuildMCP": {
      "command": "mise",
      "args": [
        "x",
        "npm:xcodebuildmcp@1.4.0-beta.1",
        "--",
        "xcodebuildmcp"
      ],
      "env": {
        "INCREMENTAL_BUILDS_ENABLED": "true"
      }
    }
  }
}

Steps to Reproduce

Ask it to build the app and install on sim, and tell it to use "Prod Debug" for configuration

Expected Behavior

it should run xcodemake commands with the specified -config parameter
-config "Prod Debug"

Actual Behavior

runs the xcodemake commands with the Debug config
-config Debug

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