jpskill.com
🛠️ 開発・MCP コミュニティ

ios-device-screenshot

USB接続された実機のiPhoneやiPadから、pymobiledevice3を使って高精細なスクリーンショットを撮影するためのSkillです。

📜 元の英語説明(参考)

Take screenshots from physical iOS devices connected via USB using pymobiledevice3. Use when capturing screenshots from real iPhones/iPads (not simulators), debugging on-device, or needing high-fidelity device captures. Triggers on physical iOS device screenshots, pymobiledevice3 usage, or USB-connected device capture tasks.

🇯🇵 日本人クリエイター向け解説

一言でいうと

USB接続された実機のiPhoneやiPadから、pymobiledevice3を使って高精細なスクリーンショットを撮影するためのSkillです。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o ios-device-screenshot.zip https://jpskill.com/download/5878.zip && unzip -o ios-device-screenshot.zip && rm ios-device-screenshot.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/5878.zip -OutFile "$d\ios-device-screenshot.zip"; Expand-Archive "$d\ios-device-screenshot.zip" -DestinationPath $d -Force; ri "$d\ios-device-screenshot.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して ios-device-screenshot.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → ios-device-screenshot フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

iOSデバイスのスクリーンショット

pymobiledevice3 を使用して、USBで接続された物理iOSデバイスからスクリーンショットを撮影します。

インストール

# uv を使用して pymobiledevice3 をインストールします (推奨)
uv tool install pymobiledevice3

# または pipx を使用してインストールします
pipx install pymobiledevice3

前提条件

  1. USBで接続された物理iOSデバイス
  2. デバイスで開発者モードが有効になっていること (設定 > プライバシーとセキュリティ > 開発者モード)
  3. デバイスが信頼されていること - デバイスで「このコンピューターを信頼しますか?」のプロンプトを承認してください

使用方法

iOS 17以降 (iOS 26以降を含む)

iOS 17以降では、root権限で実行される tunneld デーモンが必要です。

# ターミナル 1: tunneld を起動します (sudo が必要で、継続的に実行されます)
sudo pymobiledevice3 remote tunneld

# ターミナル 2: DVT (Developer Tools) 経由でスクリーンショットを撮影します
pymobiledevice3 developer dvt screenshot --tunnel "" /path/to/screenshot.png

--tunnel "" フラグは、デバイス通信に tunneld を使用するように指示します。

iOS 16以前

pymobiledevice3 developer screenshot /path/to/screenshot.png

クイックリファレンス

# 接続されているデバイスを一覧表示します
xcrun devicectl list devices

# iOSバージョンを確認します
ideviceinfo -k ProductVersion

# 開発者イメージがマウントされているか確認します
ideviceimagemounter list

# 必要に応じて開発者イメージを自動マウントします
pymobiledevice3 mounter auto-mount --tunnel ""

# スクリーンショットを撮影します (iOS 17+) - 単一デバイス
pymobiledevice3 developer dvt screenshot --tunnel "" ~/Desktop/screenshot.png

# 特定のデバイスUDIDでスクリーンショットを撮影します (複数デバイスの場合に必要)
# まず、xcrun devicectl list devices からUDIDを取得します
# UDIDを --tunnel に直接渡します (--udid フラグは tunneld では機能しません)
pymobiledevice3 developer dvt screenshot --tunnel "00008101-001E05A41144001E" ~/Desktop/screenshot.png

重要: 複数のデバイスが接続されている場合は、UDID を --tunnel に直接渡してください (--udid ではありません)。--tunnel "" 構文は対話的な選択を促しますが、非対話型シェルでは失敗します。

トラブルシューティング

"InvalidServiceError" または "Failed to start service"

  1. tunneld が実行されていることを確認します: ps aux | grep tunneld
  2. 実行されていない場合: sudo pymobiledevice3 remote tunneld
  3. 通常のスクリーンショットではなく DVT コマンドを使用します: developer screenshot の代わりに developer dvt screenshot

"DeveloperDiskImage not mounted"

pymobiledevice3 mounter auto-mount --tunnel ""

複数のデバイスが接続されている場合

--udid でターゲットデバイスを指定します。

# まずデバイスを一覧表示します
xcrun devicectl list devices

# 特定のUDIDを使用します
pymobiledevice3 developer dvt screenshot --tunnel "" --udid "40182233-00C8-51ED-8C68-174E14E4B4C9" /tmp/screenshot.png

重要な発見

iOS 17以降では、通常の pymobiledevice3 developer screenshot コマンドは tunneld が実行されていても失敗することがよくあります。解決策は、DVT (Developer Tools) バリアントを使用することです。

# これは iOS 17+ で失敗します:
pymobiledevice3 developer screenshot --tunnel "" /tmp/screenshot.png

# これは iOS 17+ で機能します:
pymobiledevice3 developer dvt screenshot --tunnel "" /tmp/screenshot.png

統合例

#!/bin/bash
# iOSデバイスのスクリーンショットを撮影して開きます

OUTPUT="/tmp/ios-screenshot-$(date +%Y%m%d-%H%M%S).png"

# tunneld が実行されているか確認し、実行されていなければ起動します
if ! pgrep -f "pymobiledevice3 remote tunneld" > /dev/null; then
    echo "Starting tunneld (requires sudo)..."
    sudo pymobiledevice3 remote tunneld &
    sleep 3
fi

# スクリーンショットを撮影します
pymobiledevice3 developer dvt screenshot --tunnel "" "$OUTPUT"

if [ -f "$OUTPUT" ]; then
    echo "Screenshot saved to: $OUTPUT"
    open "$OUTPUT"  # macOS: プレビューで開きます
else
    echo "Failed to capture screenshot"
    exit 1
fi
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

iOS Device Screenshot

Take screenshots from physical iOS devices connected via USB using pymobiledevice3.

Installation

# Install pymobiledevice3 using uv (recommended)
uv tool install pymobiledevice3

# Or with pipx
pipx install pymobiledevice3

Prerequisites

  1. Physical iOS device connected via USB
  2. Developer Mode enabled on the device (Settings > Privacy & Security > Developer Mode)
  3. Device trusted - approve "Trust This Computer" prompt on device

Usage

For iOS 17+ (including iOS 26+)

iOS 17+ requires a tunneld daemon running with root privileges:

# Terminal 1: Start tunneld (requires sudo, runs continuously)
sudo pymobiledevice3 remote tunneld

# Terminal 2: Take screenshot via DVT (Developer Tools)
pymobiledevice3 developer dvt screenshot --tunnel "" /path/to/screenshot.png

The --tunnel "" flag tells it to use the tunneld for device communication.

For iOS 16 and earlier

pymobiledevice3 developer screenshot /path/to/screenshot.png

Quick Reference

# List connected devices
xcrun devicectl list devices

# Check iOS version
ideviceinfo -k ProductVersion

# Check if developer image is mounted
ideviceimagemounter list

# Auto-mount developer image if needed
pymobiledevice3 mounter auto-mount --tunnel ""

# Take screenshot (iOS 17+) - single device
pymobiledevice3 developer dvt screenshot --tunnel "" ~/Desktop/screenshot.png

# Take screenshot with specific device UDID (required for multiple devices)
# First get UDIDs from: xcrun devicectl list devices
# Pass UDID directly to --tunnel (NOT --udid flag which doesn't work with tunneld)
pymobiledevice3 developer dvt screenshot --tunnel "00008101-001E05A41144001E" ~/Desktop/screenshot.png

Important: When multiple devices are connected, pass the UDID directly to --tunnel (not --udid). The --tunnel "" syntax prompts for interactive selection which fails in non-interactive shells.

Troubleshooting

"InvalidServiceError" or "Failed to start service"

  1. Ensure tunneld is running: ps aux | grep tunneld
  2. If not running: sudo pymobiledevice3 remote tunneld
  3. Use the DVT command instead of regular screenshot: developer dvt screenshot instead of developer screenshot

"DeveloperDiskImage not mounted"

pymobiledevice3 mounter auto-mount --tunnel ""

Multiple devices connected

Specify the target device with --udid:

# List devices first
xcrun devicectl list devices

# Use specific UDID
pymobiledevice3 developer dvt screenshot --tunnel "" --udid "40182233-00C8-51ED-8C68-174E14E4B4C9" /tmp/screenshot.png

Key Discovery

For iOS 17+, the regular pymobiledevice3 developer screenshot command often fails even with tunneld running. The solution is to use the DVT (Developer Tools) variant:

# This fails on iOS 17+:
pymobiledevice3 developer screenshot --tunnel "" /tmp/screenshot.png

# This works on iOS 17+:
pymobiledevice3 developer dvt screenshot --tunnel "" /tmp/screenshot.png

Integration Example

#!/bin/bash
# Take iOS device screenshot and open it

OUTPUT="/tmp/ios-screenshot-$(date +%Y%m%d-%H%M%S).png"

# Check if tunneld is running, start if not
if ! pgrep -f "pymobiledevice3 remote tunneld" > /dev/null; then
    echo "Starting tunneld (requires sudo)..."
    sudo pymobiledevice3 remote tunneld &
    sleep 3
fi

# Take screenshot
pymobiledevice3 developer dvt screenshot --tunnel "" "$OUTPUT"

if [ -f "$OUTPUT" ]; then
    echo "Screenshot saved to: $OUTPUT"
    open "$OUTPUT"  # macOS: open in Preview
else
    echo "Failed to capture screenshot"
    exit 1
fi