claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] iOS Simulator tool and panel: taps and mouse clicks land at 0.96x the intended position on iPhone 12 mini / 13 mini (tool reports 360x780 pt, device is 375x812 pt)

Open ohyeaho opened this issue 3 weeks ago • 1 comments

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

On the iPhone 13 mini simulator (and, by the same device definition, iPhone 12 mini), the iOS Simulator tool (control action) puts every tap and swipe at 0.96× the position Claude asks for. Taps near the top-left corner land almost correctly. Taps near the right edge land about 15 pt to the left, and taps near the bottom land about 31 pt too high. Claude aims at a button in the tool's own screenshot and hits the control above it, or nothing at all.

Mouse clicks in the live simulator panel are affected the same way. Clicking the upper part of a row in the panel opens the row above it. So this is not only a problem for Claude: anyone using the panel with an iPhone 12 mini / 13 mini simulator clicks the wrong control near the bottom and right of the screen.

The tool and the device disagree about the point size of the screen:

  • attach reports: Coordinate space for tap/swipe: 360x780 points (origin top-left). That is the screenshot size (1080×2340 px) divided by the 3x scale.
  • The device's real UIKit point size is 375×812. These two device types render a 1125×2436 canvas and downsample it by 0.96 onto the 1080×2340 screen.
  • The tool appears to inject the coordinates unchanged as UIKit points. A tap at (x, y) in the 360×780 frame therefore lands at the pixel shown at (0.96·x, 0.96·y) in that frame.

From the device definitions in /Library/Developer/CoreSimulator/Profiles/DeviceTypes/:

iPhone 13 mini.simdevicetype → capabilities.plist
ScreenDimensionsCapability main-screen-width 1080, main-screen-height 2340, main-screen-scale 3
Screen 1 (screenID 1) canvasWidth 1125, canvasHeight 2436, width 1080, scale 3

1125 / 3 = 375 and 2436 / 3 = 812, so UIKit lays out at 375×812 pt. I checked all 133 device types installed with Xcode 27.2. Only iPhone 12 mini and iPhone 13 mini have a canvas size that differs from the screen size, so other devices are probably not affected.

The layout confirms the 375-pt width: in the 1080-px screenshot, the inset-grouped list cards in Settings span x = 47…1033 px. Divided by 2.88 (1080/375), that is 16.3…358.7 pt, the standard 16-pt margins in a 375-pt-wide layout.

What Should Happen?

A tap at (x, y) in the tool's reported coordinate space should land on the pixel shown at (3x, 3y) in the tool's own screenshot. Either of these would fix it:

  • report and accept the device's real point space (375×812) for these device types, or
  • keep reporting 360×780 and scale incoming coordinates by 375/360 before injecting them.

A mouse click in the panel should land on the pixel under the cursor. The same mapping should probably apply to swipe, touch_path and touch2_path.

Error Messages/Logs

# attach
Simulator panel already attached to `<device name>` (<UDID>). Coordinate space for tap/swipe: 360x780 points (origin top-left).

# every tap reports success, e.g.
Tapped at (180, 380) on `<device name>` (<UDID>).

No errors. The taps "succeed" but land in the wrong place.

Steps to Reproduce

Only Apple's Settings app is needed (no third-party app):

  1. Create and boot an iPhone 13 mini simulator on the iOS 27.0 runtime.
  2. xcrun simctl launch <UDID> com.apple.Preferences
  3. In the Code tab, have Claude call control with attach. It reports 360x780 points. Then call screenshot, which returns a 1080×2340 px image. The tool's coordinates = screenshot pixels ÷ 3.
  4. Have Claude tap rows near their edges with short taps (duration 0.05 s). Take the screenshot in a separate call after the tap, so the push animation has finished.

My results on the top-level Settings list (portrait, not scrolled; the device language was not English, so row names are given in English). Positions come from the screenshot pixels ÷ 3. They will shift a little with locale and iOS version, but the pattern does not:

Tap (tool coords) Where it is on the screenshot Result Explained by ×0.96
(180, 380) inside the General row (its top edge is at y = 371.7) nothing lands at y ≈ 364.8, in the gap above the card
(180, 384) inside the General row nothing lands at y ≈ 368.6, still above the card
(180, 390) inside the General row General opens lands at y ≈ 374.4
(180, 395) inside the General row General opens lands at y ≈ 379.2
(180, 680) upper part of the Appearance row (spans y = 672.7…706.7) Home Screen & App Library (the row above) opens lands at y ≈ 652.8, inside the row above (622.3…672.7)
(180, 708) on the floating search field, below Appearance Appearance opens lands at y ≈ 679.7, inside Appearance
(352, 447) empty margin right of the Accessibility row (the card ends at x = 344.3) Accessibility opens lands at x ≈ 337.9, inside the card

The General row only responds from y ≈ 387, which is 371.7 × 375/360. Its visible top edge is at 371.7.

Quick check on any layout: tap a few points below the top edge of a row near the bottom of the screen. The row above it opens.

Same check with the mouse: open Settings in the live panel and click just below the separator line above the Appearance row. Home Screen & App Library (the row above) opens instead of Appearance.

Claude Model

Opus (the bug is in the tool, not the model)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.321 (bundled with the Claude desktop app 5.1231.2, Code tab)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other (Claude desktop app, Code tab: iOS Simulator tool mcp__Claude_Code_iOS_Simulator__control and panel)

Additional Information

Environment

  • Claude desktop app 5.1231.2 (Code tab), bundled Claude Code 2.1.321
  • macOS 27.2.1 (26B131), Apple silicon
  • Xcode 27.2 (27B52)
  • Simulator: iPhone 13 mini, iOS 27.0 runtime (24A434)

Workaround: for the tool, on iPhone 12 mini / 13 mini, multiply both coordinates by 375/360 (≈ 1.0417) before passing them to tap/swipe. For mouse clicks in the panel, there is no practical workaround other than using a device type whose canvas matches its screen.

Not verified: in the live panel, Claude's pointer marker seemed to appear where the tool aimed, while the touch registered above it. If so, the marker hides the miss. I have not checked this carefully.

Related, but different:

  • #103378: taps miss after an app forces landscape (orientation; fixed)
  • #96941: iPhone Duo fold state and orientation, stale coordinate space
  • #96432: taps fail silently or land out of order

This report is about a constant ×0.96 scale in plain portrait, on a fixed device type, with no rotation or fold involved.

ohyeaho avatar Nov 12 '26 10:11 ohyeaho

Thanks for the detailed report. This is fixed in Claude Desktop 6.6395.1 for iPhone 12 mini and iPhone 13 mini simulators with Xcode 27. If taps or clicks still miss on 6.6395.1 or later, please reply with your Claude Desktop and Xcode versions.

chaoshuai-ant avatar Nov 19 '26 23:11 chaoshuai-ant