Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#513 1 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
74/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
macos, typescript
Lĩnh vực
mobile-dev, tooling

Hướng nghiên cứu

Bắt đầu trong src/utils/focus-policy.ts tại thứ tự các frontend candidate, sau đó theo dõi cách src/mcp/tools/simulator/build_run_sim.ts gọi policy sau khi boot. Tái hiện với Xcode stable và beta đã được cài đặt, đồng thời DEVELOPER_DIR chọn stable; hoàn tất có nghĩa là GUI tự động khởi chạy frontend do Xcode đã chọn sở hữu, trong khi chế độ headless vẫn không mở frontend nào.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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", "xcodebuildmcp@2.7.0", "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.

Ngôn ngữ chính
TypeScript
Star
6.4k
Fork
320
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của getsentry/XcodeBuildMCP

Tất cả issue của getsentry/XcodeBuildMCP

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.