[Bug] iOS Simulator input actions fail with sandbox: "Failed to initialize IO ports for device IO client"

Status Fixed / completed
Reported on v2.1.271
Maintainer reply None cached
Activity 1 comment · opened Sep 17, 2026 · closed Oct 11, 2026

Bug Description
iOS Simulator tools: tap/swipe/text fail with "Failed to initialize IO ports for device IO client" — sandbox, not Xcode 27 Summary mcp__Claude_Code_iOS_Simulator__control input actions (tap, swipe, touch_path, text, button) always fail. attach/launch/screenshot work fine. The failure is NOT caused by Xcode 27 removing the API. SimDeviceLegacyHIDClient still exists in Xcode 27 and its initWithDevice:error: still succeeds — but only when called from a process that is not inside the claude-ios-sim.sb sandbox. Environment macOS 26.6.2 (25G83), arm64 Xcode 27.0 (27A266a) iOS 26.5 simulator runtime (23F77), iPhone 17 Pro Claude desktop 2.110.1, claude-code 2.1.271 Helper: /Applications/Claude.app/Contents/Helpers/Claude iOS Sim.app launched via sandbox-exec -f /Applications/Claude.app/Contents/Resources/claude-ios-sim.sb Error tap failed: clientCreationFailed( clientClass: "SimulatorKit.SimDeviceLegacyHIDClient", underlying: FBControlCore.FBObjCRuntimeClassError.initializerRaised( className: "SimulatorKit.SimDeviceLegacyHIDClient", underlying: Error Domain=com.facebook.FBObjCExceptionGuard Code=0 "Failed to initialize IO ports for device IO client.")) Evidence that the sandbox is the cause Run seconds apart, same machine, same booted simulator, Xcode running: Caller Result Claude's simulator tool (sandboxed) FAILS — "Failed to initialize IO ports" Our own Swift binary (not sandboxed) SUCCEEDS The unsandboxed probe does exactly what FBSimulatorControl does: dlopen(".../CoreSimulator.framework/CoreSimulator", RTLD_NOW) dlopen(".../Xcode.app/Contents/SharedFrameworks/SimulatorKit.framework/SimulatorKit", RTLD_NOW) // SimServiceContext -> defaultDeviceSet -> devices -> find by UDID let cls = NSClassFromString("SimulatorKit.SimDeviceLegacyHIDClient")! let client = cls.alloc().perform( NSSelectorFromString("initWithDevice:error:"), with: device, with: nil) // -> <SimulatorKit.SimDeviceLegacyHIDClient: 0x9f90542a0> Output: เจอเครื่องทั้งหมด 11 เครื่อง เครื่องเป้าหมาย: iPhone 17 Pro สถานะ: 3 ✅ สร้างตัวเชื่อม HID สำเร็จ: <SimulatorKit.SimDeviceLegacyHIDClient: 0x9f90542a0> So the class, the selector and the device are all fine under Xcode 27. Opening the IO ports requires a Mach service lookup that the sandbox profile appears to deny. Suggested fix: allow the CoreSimulator IO/indigo Mach services in claude-ios-sim.sb (the ports used by SimDeviceIO connectIOPort: / ioPorts). Steps to reproduce Install Xcode 27.0 on macOS 26.6.2 (Apple silicon) xcrun simctl boot 'iPhone 17 Pro' Call the simulator tool with action tap at any coordinate Every input action fails with the error above; screenshot still works Things ruled out Restarting CoreSimulatorService (killall) — no change Rebooting the simulator — no change Having Xcode open vs closed — no change Having DeviceHub.app open (Xcode 27 replaced Simulator.app with it) — no change Separate, possibly related The in-app simulator panel never appears. The desktop config reports: "iosSimulator": {"status": "unsupported", "reason": "iOS Simulator is disabled by its rollout flag"} but attach/launch still return "Simulator panel opened", which is misleading — the tool reports success for a panel the user never sees.

Environment Info

  • Platform: darwin
  • Terminal: claude-desktop
  • Version: 2.1.271
  • Feedback ID: 00f48268-9747-4597-8b0e-529d044aaf11

Errors

[]

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗