Skip to content

Feature Request: Screenshot from real iOS devices (not just simulators) #6

@igorzheludkov

Description

@igorzheludkov

Summary

Add support for capturing screenshots from physical iOS devices connected via USB, not just iOS simulators.

Currently ios_screenshot only works with booted simulators. For developers testing on real hardware (e.g., camera features, push notifications, performance profiling), there is no way to capture a screenshot through the MCP tools.

Suggested Implementation

libimobiledevice via idevicescreenshot

Uses the open-source idevicescreenshot command from libimobiledevice.

# Install
brew install libimobiledevice

# Capture
idevicescreenshot /tmp/screenshot.png

# With specific device
idevicescreenshot -u <udid> /tmp/screenshot.png

Pros: Cross-platform, no Xcode required, widely used, lightweight.
Cons: Requires separate install (brew install libimobiledevice).

Note: xcrun devicectl (Xcode 15+) was considered but does not support screenshots — its device info subcommands are limited to app listing, processes, files, and display info.

Proposed API

Extend the existing ios_screenshot tool or add a new ios_screenshot_device tool:

Parameters:
  - udid (optional): Target device UDID. If omitted, use the first connected device.
  - outputPath (optional): Path to save the screenshot.

Behavior:
  - Detect whether the target is a simulator or real device
  - Use the appropriate capture method
  - Return image data in the same format as the current ios_screenshot tool

Use Cases

  • Testing features only available on real devices (camera, NFC, push notifications)
  • Verifying UI on actual hardware during MCP-assisted development workflows
  • Debugging layout issues specific to real device screen sizes/notches

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions