Skip to content

screenshot fails on physical iOS device with Xcode 26.x — devicectl device screenshot subcommand not found #129

@nickdima

Description

@nickdima

Description

agent-device screenshot fails on physical iOS devices when using Xcode 26.x because agent-device calls xcrun devicectl device screenshot, which no longer exists as a subcommand in devicectl 506.6 (shipped with Xcode 26.2).

Environment

  • agent-device version: 0.6.3
  • Xcode version: 26.2 (Build 17C52)
  • devicectl version: 506.6
  • Device: iPhone 15 Pro (physical, connected via USB)

Steps to Reproduce

agent-device open MyApp --platform ios
agent-device screenshot output.png

Actual Behavior

Error (COMMAND_FAILED): Failed to capture iOS screenshot
Hint: Ensure the iOS device is unlocked, trusted, and available in Xcode > Devices, then retry.

With --debug, the underlying command and error are visible:

{
  "cmd": "xcrun",
  "args": ["devicectl", "device", "screenshot", "--device", "<udid>", "output.png"],
  "exitCode": 64,
  "stderr": "error: Unknown option '--device'"
}

Root Cause

devicectl device screenshot is not a valid subcommand in Xcode 26.2. The available devicectl device subcommands are:

copy, info, install, notification, orientation, process, reboot, sysdiagnose, uninstall

Expected Behavior

Screenshot is captured successfully on a physical iOS device.

Notes

  • agent-device snapshot works correctly on the same device (once provisioning profile is configured), confirming the device is trusted, unlocked, and connected properly.
  • Xcode itself can take screenshots of the device via Window → Devices and Simulators, so the capability exists at the OS/framework level — just not via devicectl device screenshot in this Xcode version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions