Skip to content

fix(ios): name Developer Mode and pairing as the real launch blockers - #1527

Merged
thymikee merged 1 commit into
mainfrom
fix/ios-developer-mode-hint
Jul 31, 2026
Merged

fix(ios): name Developer Mode and pairing as the real launch blockers#1527
thymikee merged 1 commit into
mainfrom
fix/ios-developer-mode-hint

Conversation

@thymikee

Copy link
Copy Markdown
Member

Found while running the #1521 hardware matrix on a second iPhone that had never been used for development.

The problem

The device was unlocked, trusted, and reported by Xcode as available (paired). Every launch still failed:

Error (COMMAND_FAILED): Failed to launch iOS app: The developer disk image could not be
mounted on this device. (com.apple.dt.CoreDeviceError error 12040 (0x2F08))
Hint: Ensure the iOS device is unlocked, trusted, and available in Xcode > Devices, then retry.

Every instruction in that hint was already satisfied, so it sends you to re-check the things that are fine. The actual cause is stated plainly by devicectl:

Error: The operation failed because Developer Mode is disabled.
• Developer Mode Status: Disabled

Developer Mode being off is the normal state of a phone that has never been used for development, so this is the first thing a new device hits — and the one thing the hint never mentions. The product already understands the concept: runner startup has a verify_developer_mode step, and cli-help documents "have Developer Mode enabled". It just never reached this failure path.

Change

Two cases added to resolveIosDevicectlHint, which already maps specific devicectl failures to specific advice:

  • disk-image mount failure / explicit "Developer Mode is disabled" → point at Settings > Privacy & Security > Developer Mode, including the restart
  • "must be paired" → explain the full pairing flow including entering the device passcode, which is the step that actually completes it. Tapping Trust alone leaves the device unpaired, which is exactly what happened here — the device sat unpaired through several retries until pairing was completed properly.

Unrecognised failures still fall through to the default hint.

Verification

Not just unit-tested — checked against the real device that was failing:

Error (COMMAND_FAILED): Failed to launch iOS app: The developer disk image could not be mounted…
Hint: Enable Developer Mode on the iOS device (Settings > Privacy & Security > Developer Mode),
      restart it when prompted, unlock it, then retry.

Unit tests cover both new cases, the "must be paired" text captured verbatim from the live unpaired run, and that an unrecognised failure still returns null.

pnpm check:affected --run passes except provider-integration Android timeouts that pass 21/21 in isolation — the known contention signature, in modules this diff does not touch (it changes hint strings only).

A freshly paired iPhone that is unlocked, trusted and reported by Xcode as
available (paired) still cannot launch anything while Developer Mode is off.
The failure surfaced as a disk-image mount error carrying the default hint,
which tells the user to check that the device is unlocked, trusted and visible
in Xcode — all of which were already true. devicectl knows the actual cause and
says so: 'The operation failed because Developer Mode is disabled.'

Map that failure, and the unpaired one, onto hints that name what to do. The
pairing hint also mentions the device passcode, without which tapping Trust
leaves the device unpaired.

Observed on a real iPhone 13 that had never been used for development.
@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.91 MB 1.91 MB +384 B
JS gzip 613.3 kB 613.4 kB +147 B
npm tarball 731.3 kB 731.5 kB +154 B
npm unpacked 2.57 MB 2.57 MB +384 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.5 ms 27.6 ms +0.1 ms
CLI --help 57.5 ms 62.1 ms +4.6 ms

Top changed chunks: no changes in the largest emitted chunks.

@thymikee

Copy link
Copy Markdown
Member Author

Reviewed exact head 16e7af07fc3fb703b36edc43b4e0922f8c19de67: clean and ready for human review. The change stays in the shared Apple devicectl hint resolver, preserves the generic fallback, and follows ADR 0010 by replacing misleading recovery advice with actionable Developer Mode and pairing steps. The focused tests are non-vacuous, all 30 checks are green, and the PR includes real-device evidence from the previously failing iPhone. No code findings or unresolved CI/device-evidence blockers.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Jul 31, 2026
@thymikee
thymikee merged commit f0fa81a into main Jul 31, 2026
30 checks passed
@thymikee
thymikee deleted the fix/ios-developer-mode-hint branch July 31, 2026 16:04
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-31 16:05 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant