Problem
#1355 showed an iPhone 8 Plus (iOS 16.7.16) that is visible to xcdevice/xctrace but absent from devicectl/CoreDevice. #1360 fixed discovery parsing, but opening a session still fails because the physical-device lifecycle and artifact paths are hard-coded to devicectl.
We need an abstraction seam around devicectl so that devices running iOS 15+ (which still receive security patches) can be used even when Apple’s CoreDevice stack does not enumerate them.
Affected paths (all currently devicectl-only)
src/daemon/device-ready.ts — readiness checks (devicectl device info)
src/platforms/apple/core/devicectl.ts — app inventory (device info apps) and process lookup (device info processes)
src/platforms/apple/core/app-launch.ts and app-install.ts — app install/launch lifecycle
src/platforms/apple/core/runner/runner-transport.ts — transport address lookup
src/platforms/apple/core/screenshot.ts — screenshots and file copy
Possible fallback(s)
xcodebuild build-for-testing / test-without-building with the agent-device XCTest runner already reaches AGENT_DEVICE_RUNNER_LISTENER_READY on these devices.
- MobileDevice/libimobiledevice-style commands (
ideviceinfo, ideviceinstaller, idevicedebug, ifuse/screenshot) are another proven fallback.
- The seam should select the backend based on capability detection, not just iOS version, so newer CoreDevice-visible devices keep using the existing fast path.
Acceptance criteria
Related
Problem
#1355 showed an iPhone 8 Plus (iOS 16.7.16) that is visible to
xcdevice/xctracebut absent fromdevicectl/CoreDevice. #1360 fixed discovery parsing, but opening a session still fails because the physical-device lifecycle and artifact paths are hard-coded todevicectl.We need an abstraction seam around
devicectlso that devices running iOS 15+ (which still receive security patches) can be used even when Apple’s CoreDevice stack does not enumerate them.Affected paths (all currently
devicectl-only)src/daemon/device-ready.ts— readiness checks (devicectl device info)src/platforms/apple/core/devicectl.ts— app inventory (device info apps) and process lookup (device info processes)src/platforms/apple/core/app-launch.tsandapp-install.ts— app install/launch lifecyclesrc/platforms/apple/core/runner/runner-transport.ts— transport address lookupsrc/platforms/apple/core/screenshot.ts— screenshots and file copyPossible fallback(s)
xcodebuild build-for-testing/test-without-buildingwith the agent-device XCTest runner already reachesAGENT_DEVICE_RUNNER_LISTENER_READYon these devices.ideviceinfo,ideviceinstaller,idevicedebug,ifuse/screenshot) are another proven fallback.Acceptance criteria
xctracebut absent fromdevicectlcan completeagent-device openand a basic interaction command.devicectl-capable devices continue to use the current path unchanged.src/core/capabilities.tsand is unit-testable without a real device (mock the provider registry).Related
xctracebut absent fromdevicectl(parser half fixed by fix(apple): parse parenthesized xctrace physical device format #1360)xctracephysical device format