Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug]: Device Hub opens for stable Xcode when Xcode 27 beta is co-installed

未关闭
#513 2 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
74/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
macos, typescript

调研方向

从 src/utils/focus-policy.ts 中的前端候选顺序开始,然后跟踪 src/mcp/tools/simulator/build_run_sim.ts 如何在启动后调用 policy。安装 stable 和 beta Xcode,并让 DEVELOPER_DIR 选择 stable,以复现该问题;完成标准是自动 GUI 启动由所选 Xcode 所拥有的前端,而 headless 模式仍然不会打开任何前端。

由索引模型根据 Issue 内容生成。

描述

stale
Bug Description

When Xcode 26 stable and Xcode 27 beta are installed together, XcodeBuildMCP
2.7.0 opens the beta-only Device Hub even when DEVELOPER_DIR explicitly
selects stable Xcode and the target is an iOS 26.5 simulator.

This crosses the selected toolchain boundary. Stable Xcode 26 ships
Simulator.app; Device Hub is bundled only inside Xcode 27 beta on this host.

The cause appears to be the frontend candidate order in
focus-policy.ts:
the Device Hub candidate is attempted first for every non-headless simulator
launch—via devices:// when a simulator ID is known, or open -a DeviceHub
otherwise—without consulting the active Xcode selected by DEVELOPER_DIR.
Simulator.app is only a fallback if opening Device Hub fails. build_run_sim
invokes this policy automatically after boot.
The same behavior is still present on main as of 2026-08-10.

Debug Output
Platform: macOS 26.5.2 (25F84), arm64
Stable Xcode: 26.6 (17F113)
Beta Xcode: 27.0 (27A5237l)
Selected DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
XcodeBuildMCP: 2.7.0
Codex CLI: 0.144.1

Stable frontend:
  /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app
  bundle id: com.apple.iphonesimulator

Beta frontend:
  /Applications/Xcode-beta.app/Contents/Applications/DeviceHub.app
  bundle id: com.apple.dt.Devices

Target simulator:
  iPhone 17 Pro, iOS 26.5

Control result with XCODEBUILDMCP_HEADLESS_LAUNCH=1:
  build-and-run SUCCEEDED on the iOS 26.5 simulator
  app launched successfully
  no DevicesTrampoline process was created
Editor/Client

Codex desktop with Codex CLI 0.144.1

MCP Server Version

2.7.0

LLM

GPT-5 Codex

MCP Configuration
[mcp_servers.xcodebuildmcp]
command = "npx"
args = ["-y", "[email protected]", "mcp"]
env = {
  DEVELOPER_DIR = "/Applications/Xcode.app/Contents/Developer",
  XCODEBUILDMCP_ENABLED_WORKFLOWS = "simulator,ui-automation,debugging,logging",
}
Steps to Reproduce
  1. Install Xcode 26 stable at /Applications/Xcode.app.
  2. Install Xcode 27 beta at /Applications/Xcode-beta.app.
  3. Set DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer.
  4. Leave XCODEBUILDMCP_HEADLESS_LAUNCH unset.
  5. Select an available iOS 26.5 simulator by UDID.
  6. Run open_sim or build_run_sim.
  7. Observe that Device Hub from Xcode 27 beta opens instead of Simulator.app
    from the selected stable Xcode.
Expected Behavior

In automatic GUI mode, the active Apple toolchain should own the simulator
frontend:

  • Xcode 26 stable selected -> Simulator.app
  • Xcode 27 selected -> Device Hub

An explicit auto | simulator | device-hub preference would also work, with
auto derived from the Xcode selected by DEVELOPER_DIR rather than from the
machine-wide devices:// URL handler.

Headless mode should continue to suppress both frontends.

Actual Behavior

For every non-headless launch, XcodeBuildMCP tries Device Hub first. Because the
Xcode 27 beta installation registers devices://, that succeeds even though
stable Xcode is selected, so Simulator.app is never attempted.

Error Messages

No command error is emitted; the wrong GUI frontend opens successfully.

Related

#498 covers the separate but complementary problem of selecting the newest
simulator runtime within a stable OS major when a next-major beta is installed.

主要语言
TypeScript
星标
6.4k
派生
320
PR 合并指标
30 天内没有已合并 PR

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

getsentry/XcodeBuildMCP 的其他 Issue

查看 getsentry/XcodeBuildMCP 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。