Repository navigation
Support iOS 16 physical devices visible to xctrace but absent from devicectl #1355
Description
Summary
An iPhone 8 Plus running iOS 16.7.16 is available to Xcode, xcdevice, and xctrace, but it is absent from devicectl/CoreDevice. This exposes two separate compatibility gaps:
agent-devicedoes not parse the current parenthesized physical-device format emitted byxctrace.- After discovery is fixed, physical-device readiness and lifecycle operations still require
devicectl, so the device cannot open a session.
Environment
- agent-device: current
mainat32ba4b67f462032338154f95b4c0d9f734eccbc9(package version 0.19.3) - macOS: 15.6 (24G84)
- Xcode: 26.2 (17C52)
- Node.js: 22.22.3
- Device: iPhone 8 Plus (
iPhone10,2), iOS 16.7.16 (20H392)
Reproduction
The device is connected, trusted, and usable from Xcode.
$ xcrun xcdevice list
# The iPhone 8 Plus is present and available.
$ xcrun xctrace list devices
== Devices ==
iPhone 8 Plus (16.7.16) (<legacy-device-udid>)
$ xcrun devicectl list devices
# The iPhone 8 Plus is absent.
$ agent-device devices --platform ios
# Before the parser fix, the iPhone 8 Plus is absent.
$ agent-device open <bundle-id> --platform ios --device <legacy-device-udid>
DEVICE_NOT_FOUNDRoot cause: discovery parser
parseXctracePhysicalAppleDevices currently accepts only this legacy format:
Device Name [device-id]
Current Xcode emits physical devices as:
Device Name (OS Version) (device-id)
A minimal local change that accepts both formats, plus a regression test for the parenthesized format, makes the iPhone 8 Plus appear in:
$ agent-device devices --platform ios
iPhone 8 Plus (ios device target=mobile) booted=trueThe full affected check passes after this change:
- related tests: 1323/1323
- coverage tests: 4542/4542
- provider integration tests: 140/140
- format, lint, typecheck, layering, fallow, and build: passed
Remaining blocker after discovery
Opening a session still fails because this device is not managed by devicectl/CoreDevice. In particular, the current physical-device paths depend on devicectl for:
- readiness checks in
src/daemon/device-ready.ts - app inventory and process lookup in
src/platforms/apple/core/devicectl.ts - app launch/install in
app-launch.tsandapp-install.ts - runner transport address lookup in
runner/runner-transport.ts - screenshots/file copy in
screenshot.ts
A direct xcodebuild build-for-testing + test-without-building run of the agent-device XCTest runner succeeds on the same phone and reaches AGENT_DEVICE_RUNNER_LISTENER_READY. This suggests the XCTest runner itself can support the device; the blocker is the devicectl-only lifecycle/transport path.
Expected behavior
Ideally:
- Parse both supported
xctracephysical-device line formats. - For devices visible to
xcdevice/xctracebut absent fromdevicectl, use an Xcode/XCTest/MobileDevice-compatible fallback for readiness, launch, transport, and artifact copy.
If supporting these devices is intentionally out of scope, please document the minimum supported iOS/Xcode/CoreDevice combination and report a targeted unsupported-device error instead of DEVICE_NOT_FOUND.
I can prepare the small discovery parser fix as a PR separately from the larger legacy-device backend work.
Activity
thymikee commentedon Jul 21, 2026
Hey, would you like to contribute the support? I'm not sure how much overhead it will be necessary to add it, because we rely heavily on deviceclt. But if it's not too much, I'll consider it. iOS 16 and 15 still get security patches, so it makes sense.
fix(apple): parse parenthesized xctrace physical device format (#1360)