-
Notifications
You must be signed in to change notification settings - Fork 93
devices command does not discover physical iOS devices running iOS <17 (devicectl pairingState: unsupported) #331
Description
Problem
agent-device devices --platform ios does not list physical iOS devices running iOS 16.x or earlier. Only simulators are shown. The device is fully functional and visible to
other Xcode tooling.
Environment
- agent-device 0.11.3
- macOS 15.6 (Sequoia)
- Xcode 16.2
- iPhone X (iPhone10,6), iOS 16.3
- Device is paired, trusted, Developer Mode enabled, DDI mounted
Root cause
agent-device enumerates physical iOS devices exclusively via xcrun devicectl list devices. CoreDevice (devicectl) requires iOS 17+ for its pairing protocol. Devices running iOS
16 and earlier report pairingState: "unsupported" and return nil for all hardwareProperties and deviceProperties. The filtering logic in daemon.js then drops them because
productType, platform, and name are all empty.
Meanwhile, these same devices are fully accessible through the legacy MobileDevice framework:
$ xcrun xctrace list devices
== Devices ==
iPhone (16.3)
== Devices Offline ==
Unknown <-- CoreDevice entry
$ xcrun devicectl list devices --verbose
pairingState: unsupported
tunnelState: unavailable
hardwareProperties: { } # all nil
deviceProperties: { bootState: "booted" } # everything else nil
Impact
Any physical device that cannot run iOS 17 is permanently invisible to agent-device. This affects:
- iPhone X and earlier
- iPhone 8, 8 Plus
- iPad 5th gen, iPad Pro 1st gen, etc.
- Any newer device deliberately kept on iOS 16.x
Proposed solution
Add a fallback device discovery path when devicectl reports a device as unavailable/unsupported. xcrun xctrace list devices uses the legacy MobileDevice framework and correctly
enumerates these devices with their UDID, name, and iOS version.
The XCUITest runner and xcodebuild both still work with iOS 16 devices through the legacy path — it's only the enumeration via devicectl that's broken.
Workaround attempted
Passing --udid with both the legacy 40-char UDID and the CoreDevice ECID does not help — the device is filtered out before UDID matching occurs.