Control a real USB-connected iPhone from Linux (no Mac, no paid developer account) and expose it to AI agents as MCP tools
Rust ai-agentautomationclaudeclaude-codedockeriosiphonelinuxmcpmcp-servermodel-context-protocolrustwebdriveragent
README:加 banner、功能卡片和真机对照图 (#17)
Qinghe Li1f8c8da96297
diff --git a/README.md b/README.mdindex 7fb6697..d36480f 100644--- a/README.md+++ b/README.md@@ -1,29 +1,19 @@-<a name="readme-top"></a>--<div align="right">- <b>English</b> | <a href="README.zh-CN.md">简体中文</a>-</div>-<div align="center"><a href="https://github.com/Derrors/iphone-control">- <img src="website/public/logo.svg" alt="Logo" width="120">+ <img src="docs/images/banner.svg" alt="iphone-control: Let AI agents operate a real iPhone" width="100%"></a>- <h3 align="center">iphone-control</h3>-<p align="center">Let an AI agent operate a real iPhone plugged into a Linux machine or a Mac — one Rust binary, no Xcode, no paid developer account, no jailbreak.</p><p align="center">- <a href="https://github.com/Derrors/iphone-control/releases/latest"><img src="https://img.shields.io/github/v/release/Derrors/iphone-control?style=flat-square" alt="Release"></a>- <a href="https://github.com/Derrors/iphone-control/pkgs/container/iphone-control"><img src="https://img.shields.io/badge/ghcr.io-derrors%2Fiphone--control-2496ED?style=flat-square&logo=docker&logoColor=white" alt="Docker"></a>- <img src="https://img.shields.io/badge/iOS-17%2B-black?style=flat-square&logo=apple" alt="iOS">- <img src="https://img.shields.io/badge/platform-Linux%20%7C%20macOS-555?style=flat-square" alt="Platform: Linux | macOS">- <img src="https://img.shields.io/badge/MCP-15%20tools-8A2BE2?style=flat-square" alt="MCP">- <a href="Cargo.toml"><img src="https://img.shields.io/badge/Rust-1.88%2B-CE422B?style=flat-square&logo=rust&logoColor=white" alt="Rust"></a>- <a href="https://github.com/Derrors/iphone-control/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/Derrors/iphone-control/ci.yml?branch=main&style=flat-square&label=CI" alt="CI"></a>- <a href="LICENSE"><img src="https://img.shields.io/github/license/Derrors/iphone-control?style=flat-square" alt="License"></a>+ <a href="https://github.com/Derrors/iphone-control/releases/latest"><img src="https://img.shields.io/github/v/release/Derrors/iphone-control?style=flat" alt="Release"></a>+ <img src="https://img.shields.io/badge/iOS-17%2B-black?style=flat&logo=apple" alt="iOS">+ <img src="https://img.shields.io/badge/platform-Linux%20%7C%20macOS-0E7490?style=flat" alt="Platform: Linux | macOS">+ <img src="https://img.shields.io/badge/MCP-15%20tools-8A2BE2?style=flat" alt="MCP">+ <a href="Cargo.toml"><img src="https://img.shields.io/badge/Rust-1.88%2B-CE422B?style=flat&logo=rust&logoColor=white" alt="Rust"></a>+ <a href="LICENSE"><img src="https://img.shields.io/github/license/Derrors/iphone-control?style=flat" alt="License"></a></p><p align="center">@@ -34,11 +24,14 @@<a href="https://github.com/Derrors/iphone-control/releases">📦 Releases</a> · <a href="https://github.com/Derrors/iphone-control/issues">🐛 Issues</a>+ · + <a href="README.zh-CN.md">🌐 简体中文</a></p>-</div>-> [!NOTE]-> Early release (0.x). Verified with an **iPhone 15 Pro Max (iOS 27.0.1)** on Linux and macOS (Apple Silicon), and an **iPhone 12 mini (iOS 26.4.1)** on Linux. Other models and iOS 17+ should work but are untested — reports are welcome. The CLI, `doctor` output and MCP tool results are currently in Simplified Chinese; agents handle this fine.+ <br>+ <img src="docs/images/demo-stopwatch.webp" alt="Claude Code on the left calls iphone_launch_app and iphone_tap_element; on the right, the iPhone shows the Clock stopwatch running" width="900">+ <p><sub>Asking Claude Code to “open Clock, switch to the stopwatch and start it”. Left: Claude Code’s tool calls (first part only). Right: the phone afterwards.</sub></p>+</div>## Overview@@ -55,6 +48,10 @@ iphone-control does it all in **one Rust binary** on Linux or macOS, built on [i## Features+<p align="center">+ <img src="docs/images/features.svg" alt="One binary, 15 MCP tools, fewer round trips, runs unattended, HID fallback, doctor and alerts" width="900">+</p>+- **See and touch the screen**: screenshots with region zoom, tap, swipe, long-press, text input (including Chinese), hardware buttons- **Work with UI elements**: read the element tree, tap by text (on a part not covered by floating bars or the keyboard), launch and close apps, open URLs, wait for text to appear- **Fewer round trips**: any action can return the resulting screen once it has settled, flagging pages still loading and blocking alerts; `iphone_batch` runs up to 20 steps in one call@@ -66,49 +63,33 @@ iphone-control does it all in **one Rust binary** on Linux or macOS, built on [i## Quick Start-On Linux you need a host (x86_64 or arm64) with Docker (Compose v2), an iPhone on iOS 17+ connected by a **data** USB cable, and a free Apple ID (use a dedicated one, not your main account).+You need an iPhone on iOS 17+ connected by a **data** cable, a free Apple ID (use a dedicated one), and a Linux host with Docker or an Apple Silicon Mac.++**Linux (Docker)**```bash-git clone https://github.com/Derrors/iphone-control.git-cd iphone-control+git clone https://github.com/Derrors/iphone-control.git && cd iphone-controlcp .env.example .env # optional: proxy, notifications-docker compose up -d --build # the first build compiles Rust, a few minutes+docker compose up -d --build # the first build takes a few minutesdocker exec -it iphone-control iphone-control setup # guided setup; safe to re-runclaude mcp add iphone -s user -- docker exec -i iphone-control iphone-control mcp```-`setup` walks you through pairing, Developer Mode, signing in to your Apple ID, and signing and installing WebDriverAgent. On the phone you tap *Trust*, turn on Developer Mode, and trust your Apple ID under *Settings → General → VPN & Device Management* — see the [step-by-step guide](https://derrors.github.io/iphone-control/en/guide/getting-started).--Open a new Claude Code session and ask, for example:--> Open the Clock app, switch to the stopwatch, and show me a screenshot.--> [!TIP]-> Other MCP clients: the server speaks stdio through `docker exec` and opens no network port.->-> ```json-> { "mcpServers": { "iphone": { "command": "docker", "args": ["exec", "-i", "iphone-control", "iphone-control", "mcp"] } } }-> ```--You can also skip both the clone and the build: in a new directory, write a `compose.yaml` that uses the prebuilt image `ghcr.io/derrors/iphone-control:latest` and run `docker compose up -d` — see [Docker](https://derrors.github.io/iphone-control/en/deploy/docker#just-a-compose-file) for the full example. If you already cloned the repository, set `IMAGE=ghcr.io/derrors/iphone-control:latest` in `.env` and run `docker compose pull && docker compose up -d --no-build`. Without Docker, use a [prebuilt binary or build from source](https://derrors.github.io/iphone-control/en/deploy/source) and run it as a systemd user service.--### macOS--Docker on a Mac can't pass USB devices through to containers, so on a Mac (Apple Silicon; no Xcode needed) run the binary directly, as your regular user. Download it from [Releases](https://github.com/Derrors/iphone-control/releases) (`…-macos-arm64.tar.gz`):+**macOS** (Docker can't pass USB through on a Mac, so run the binary directly)```bash-V=v0.1.2 # latest version+V=v0.1.2 # latest releasecurl -fsSL https://github.com/Derrors/iphone-control/releases/download/$V/iphone-control-$V-macos-arm64.tar.gz | tar xzmkdir -p ~/.local/bin && install -m 755 iphone-control-$V-macos-arm64/iphone-control ~/.local/bin/-export PATH="$HOME/.local/bin:$PATH" # add this line to ~/.zprofile too-iphone-control daemon # keep this terminal open-iphone-control setup # in a second terminal-iphone-control mcp-config # prints the `claude mcp add` command to run+echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zprofile && source ~/.zprofile+iphone-control daemon # keep this terminal open+iphone-control setup # in a second terminal+iphone-control mcp-config # prints the `claude mcp add` command to run```-Downloaded with a browser instead of `curl`? Gatekeeper blocks the unnotarized binary; run `xattr -d com.apple.quarantine ~/.local/bin/iphone-control`. To build from source instead: `cargo install --path apps/iphone-control --locked` in a clone (needs the Xcode Command Line Tools and Rust 1.88+).+`setup` walks you through pairing, Developer Mode, Apple ID sign-in and installing WebDriverAgent; do what it asks on the phone. Then open a new Claude Code session and ask, for example, *“Open Clock, switch to the stopwatch and start it.”*-Set the phone's charging limit to 100% (*Settings → Battery → Charging*): with the 80% limit, USB drops about once a minute. Configuration, keeping it running and the known differences are in the [macOS guide](https://derrors.github.io/iphone-control/en/deploy/macos).+More: [step-by-step guide](https://derrors.github.io/iphone-control/en/guide/getting-started) · [prebuilt image](https://derrors.github.io/iphone-control/en/deploy/docker) · [binary / source](https://derrors.github.io/iphone-control/en/deploy/source) · [macOS guide](https://derrors.github.io/iphone-control/en/deploy/macos) · [other MCP clients](https://derrors.github.io/iphone-control/en/guide/mcp-clients).## MCP Tools@@ -149,7 +130,7 @@ Upgrade with `git pull && docker compose up -d --build` (or `docker compose pull| | || --- | --- |-| Guide | [What is it](https://derrors.github.io/iphone-control/en/guide/what-is-iphone-control) · [Getting started](https://derrors.github.io/iphone-control/en/guide/getting-started) · [AI clients](https://derrors.github.io/iphone-control/en/guide/mcp-clients) · [Tools](https://derrors.github.io/iphone-control/en/guide/tools) |+| Guide | [What is it](https://derrors.github.io/iphone-control/en/guide/what-is-iphone-control) · [Limitations](https://derrors.github.io/iphone-control/en/guide/what-is-iphone-control#limitations) · [Getting started](https://derrors.github.io/iphone-control/en/guide/getting-started) · [AI clients](https://derrors.github.io/iphone-control/en/guide/mcp-clients) · [Tools](https://derrors.github.io/iphone-control/en/guide/tools) || Usage | [Configuration](https://derrors.github.io/iphone-control/en/guide/configuration) · [Notifications](https://derrors.github.io/iphone-control/en/guide/notifications) · [Auto-unlock](https://derrors.github.io/iphone-control/en/guide/auto-unlock) || Deployment | [Docker](https://derrors.github.io/iphone-control/en/deploy/docker) · [Source / binary](https://derrors.github.io/iphone-control/en/deploy/source) · [macOS](https://derrors.github.io/iphone-control/en/deploy/macos) · [Data and backups](https://derrors.github.io/iphone-control/en/deploy/backup) || Problems | [FAQ](https://derrors.github.io/iphone-control/en/troubleshoot/faq) · [Troubleshooting](docs/troubleshooting.md) · [Issues](https://github.com/Derrors/iphone-control/issues) |@@ -159,16 +140,6 @@ Upgrade with `git pull && docker compose up -d --build` (or `docker compose pullThe architecture and design documents are in Chinese for now.-## Limitations--- One phone per host; don't run two instances (or other usbmuxd-based tools) against the same phone-- Free Apple ID profiles last 7 days. Re-signing is automatic, but an expired Apple ID session needs `login`-- After the phone reboots, you must unlock it and enter the passcode once to allow UI automation — iOS requires this-- Apple ID logins use a public third-party anisette server by default; set `ICTL_ANISETTE_URL` to use your own-- The container runs as root: it needs the USB device nodes and must restart usbmuxd after replugging-- The HID fallback needs iOS 27 or later; on older iOS everything goes through WebDriverAgent-- On macOS: Apple Silicon only (Intel Macs untested, no prebuilt binary), the binary isn't notarized, run the daemon in a terminal (no launchd service yet), no Docker (no USB passthrough); data lives in `~/.local/share/iphone-control`-> [!WARNING]> This tool can fully control your phone. An agent may tap payment, delete or send buttons — keep tool-call confirmation on in your MCP client. Not affiliated with Apple; use it only with devices and accounts you own. Read [SECURITY.md](SECURITY.md) before enabling auto-unlock.@@ -179,5 +150,3 @@ Issues and pull requests are welcome — see the [contributing guide](CONTRIBUTI## License[MIT](LICENSE). Third-party components: [THIRD_PARTY.md](THIRD_PARTY.md).--<p align="right">(<a href="#readme-top">back to top</a>)</p>diff --git a/README.zh-CN.md b/README.zh-CN.mdindex 5844c23..d62dbae 100644--- a/README.zh-CN.md+++ b/README.zh-CN.md@@ -1,29 +1,19 @@-<a name="readme-top"></a>--<div align="right">- <a href="README.md">English</a> | <b>简体中文</b>-</div>-<div align="center"><a href="https://github.com/Derrors/iphone-control">- <img src="website/public/logo.svg" alt="Logo" width="120">+ <img src="docs/images/banner.zh-CN.svg" alt="iphone-control:让 AI agent 操作一台真实的 iPhone" width="100%"></a>- <h3 align="center">iphone-control</h3>-<p align="center">让 AI agent 操作一台接在 Linux 或 Mac 上的真实 iPhone:一个 Rust 二进制,不需要 Xcode,不需要付费开发者账号,不越狱。</p><p align="center">- <a href="https://github.com/Derrors/iphone-control/releases/latest"><img src="https://img.shields.io/github/v/release/Derrors/iphone-control?style=flat-square" alt="Release"></a>- <a href="https://github.com/Derrors/iphone-control/pkgs/container/iphone-control"><img src="https://img.shields.io/badge/ghcr.io-derrors%2Fiphone--control-2496ED?style=flat-square&logo=docker&logoColor=white" alt="Docker"></a>- <img src="https://img.shields.io/badge/iOS-17%2B-black?style=flat-square&logo=apple" alt="iOS">- <img src="https://img.shields.io/badge/platform-Linux%20%7C%20macOS-555?style=flat-square" alt="平台:Linux | macOS">- <img src="https://img.shields.io/badge/MCP-15%20tools-8A2BE2?style=flat-square" alt="MCP">- <a href="Cargo.toml"><img src="https://img.shields.io/badge/Rust-1.88%2B-CE422B?style=flat-square&logo=rust&logoColor=white" alt="Rust"></a>- <a href="https://github.com/Derrors/iphone-control/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/Derrors/iphone-control/ci.yml?branch=main&style=flat-square&label=CI" alt="CI"></a>- <a href="LICENSE"><img src="https://img.shields.io/github/license/Derrors/iphone-control?style=flat-square" alt="License"></a>+ <a href="https://github.com/Derrors/iphone-control/releases/latest"><img src="https://img.shields.io/github/v/release/Derrors/iphone-control?style=flat" alt="Release"></a>+ <img src="https://img.shields.io/badge/iOS-17%2B-black?style=flat&logo=apple" alt="iOS">+ <img src="https://img.shields.io/badge/platform-Linux%20%7C%20macOS-0E7490?style=flat" alt="平台:Linux | macOS">+ <img src="https://img.shields.io/badge/MCP-15%20tools-8A2BE2?style=flat" alt="MCP">+ <a href="Cargo.toml"><img src="https://img.shields.io/badge/Rust-1.88%2B-CE422B?style=flat&logo=rust&logoColor=white" alt="Rust"></a>+ <a href="LICENSE"><img src="https://img.shields.io/github/license/Derrors/iphone-control?style=flat" alt="License"></a></p><p align="center">@@ -34,11 +24,14 @@<a href="https://github.com/Derrors/iphone-control/releases">📦 版本发布</a> · <a href="https://github.com/Derrors/iphone-control/issues">🐛 问题反馈</a>+ · + <a href="README.md">🌐 English</a></p>-</div>-> [!NOTE]-> 早期版本(0.x)。在 Linux 和 macOS(Apple Silicon)上用 **iPhone 15 Pro Max(iOS 27.0.1)** 完整验证过,在 Linux 上用 **iPhone 12 mini(iOS 26.4.1)** 验证过。其他机型和 iOS 17 以上应该也能用,但还没测过,欢迎反馈。+ <br>+ <img src="docs/images/demo-stopwatch.webp" alt="左边 Claude Code 调用 iphone_launch_app 和 iphone_tap_element,右边 iPhone 上时钟的秒表正在计时" width="900">+ <p><sub>让 Claude Code「打开时钟,切到秒表并启动」。左边是 Claude Code 的工具调用(只截了前半段),右边是完成后的手机。</sub></p>+</div>## 简介@@ -55,6 +48,10 @@ iphone-control 在 Linux 或 macOS 上用**一个 Rust 二进制**把这些事## 功能特性+<p align="center">+ <img src="docs/images/features.zh-CN.svg" alt="一个二进制、15 个 MCP 工具、少走往返、无人值守、HID 后备、诊断与通知" width="900">+</p>+- **看屏幕、点屏幕**:截图(可放大某块区域)、点击、滑动、长按、输入文字(支持中文)、硬件按键- **按界面元素操作**:读元素树、按文字点击(自动避开悬浮栏、键盘挡住的部分)、启动和结束 App、打开链接、等某段文字出现- **省往返**:任何操作都可以等界面稳定后顺带返回操作后的样子,并提示页面是否还在加载、有没有弹窗挡着;`iphone_batch` 一次执行最多 20 步@@ -66,49 +63,33 @@ iphone-control 在 Linux 或 macOS 上用**一个 Rust 二进制**把这些事## 快速开始-在 Linux 上,需要一台装了 Docker(Compose v2)的主机(x86_64 或 arm64)、一部 iOS 17 以上的 iPhone 和能**传数据**的线,以及一个免费 Apple ID(建议专门注册一个,不要用主账号)。+需要一部 iOS 17 以上的 iPhone 和能**传数据**的线、一个免费 Apple ID(建议专门注册一个),以及一台装了 Docker 的 Linux 主机或一台 Apple Silicon 的 Mac。++**Linux(Docker)**```bash-git clone https://github.com/Derrors/iphone-control.git-cd iphone-control+git clone https://github.com/Derrors/iphone-control.git && cd iphone-controlcp .env.example .env # 可选:代理、通知;国内网络一般要配代理-docker compose up -d --build # 首次构建要编译 Rust,需要几分钟+docker compose up -d --build # 首次构建需要几分钟docker exec -it iphone-control iphone-control setup # 安装向导,可重复运行claude mcp add iphone -s user -- docker exec -i iphone-control iphone-control mcp```-`setup` 会引导完成配对、打开开发者模式、登录 Apple ID、签名并安装 WebDriverAgent。手机上要做的是点「信任」、打开开发者模式,以及在 设置 → 通用 → VPN 与设备管理 里信任你的 Apple ID,详见[分步指南](https://derrors.github.io/iphone-control/guide/getting-started)。--打开一个新的 Claude Code 会话,试着说:--> 打开时钟,切到秒表,给我看一下截图。--> [!TIP]-> 其他 MCP 客户端:服务经 `docker exec` 走 stdio,不开任何网络端口。->-> ```json-> { "mcpServers": { "iphone": { "command": "docker", "args": ["exec", "-i", "iphone-control", "iphone-control", "mcp"] } } }-> ```--也可以不克隆仓库、不自己构建:新建一个目录,写一个使用预构建镜像 `ghcr.io/derrors/iphone-control:latest` 的 `compose.yaml`,然后 `docker compose up -d`,完整示例见 [Docker 部署](https://derrors.github.io/iphone-control/deploy/docker#只写一个-compose-文件)。已经克隆了仓库的话,在 `.env` 里设 `IMAGE=ghcr.io/derrors/iphone-control:latest`,然后 `docker compose pull && docker compose up -d --no-build`。不用 Docker 的话,可以用[预编译二进制或从源码编译](https://derrors.github.io/iphone-control/deploy/source),以 systemd 用户服务运行。--### macOS--Mac 上的 Docker 不能把 USB 设备交给容器,所以在 Mac(Apple Silicon,不需要 Xcode)上以普通用户直接运行二进制。从 [Releases](https://github.com/Derrors/iphone-control/releases) 下载(`…-macos-arm64.tar.gz`):+**macOS**(Mac 上的 Docker 不能直通 USB,直接运行二进制)```bashV=v0.1.2 # 最新版本号curl -fsSL https://github.com/Derrors/iphone-control/releases/download/$V/iphone-control-$V-macos-arm64.tar.gz | tar xzmkdir -p ~/.local/bin && install -m 755 iphone-control-$V-macos-arm64/iphone-control ~/.local/bin/-export PATH="$HOME/.local/bin:$PATH" # 这一行也加到 ~/.zprofile-iphone-control daemon # 这个终端保持开着-iphone-control setup # 在另一个终端运行-iphone-control mcp-config # 打印 `claude mcp add` 命令,复制运行+echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zprofile && source ~/.zprofile+iphone-control daemon # 这个终端保持开着+iphone-control setup # 在另一个终端运行+iphone-control mcp-config # 打印 `claude mcp add` 命令,复制运行```-用浏览器而不是 `curl` 下载的,Gatekeeper 会拦下没有公证的二进制,运行 `xattr -d com.apple.quarantine ~/.local/bin/iphone-control` 即可。也可以从源码编译:在克隆的仓库里 `cargo install --path apps/iphone-control --locked`(需要 Xcode 命令行工具和 Rust 1.88+)。+`setup` 会引导完成配对、开发者模式、登录 Apple ID、安装 WebDriverAgent,按提示在手机上操作即可。然后打开一个新的 Claude Code 会话,试着说:「打开时钟,切到秒表并启动」。-把手机的充电上限改成 100%(设置 → 电池 → 充电):开着「80% 上限」时 USB 大约每分钟断开一次。配置、保持运行和已知差异见 [macOS 指南](https://derrors.github.io/iphone-control/deploy/macos)。+更多:[分步指南](https://derrors.github.io/iphone-control/guide/getting-started) · [预构建镜像](https://derrors.github.io/iphone-control/deploy/docker) · [二进制 / 源码](https://derrors.github.io/iphone-control/deploy/source) · [macOS 指南](https://derrors.github.io/iphone-control/deploy/macos) · [其他 MCP 客户端](https://derrors.github.io/iphone-control/guide/mcp-clients)## MCP 工具@@ -149,7 +130,7 @@ iphone-control mcp-config # 打印 `claude mcp add`| | || --- | --- |-| 入门 | [什么是 iphone-control](https://derrors.github.io/iphone-control/guide/what-is-iphone-control) · [快速开始](https://derrors.github.io/iphone-control/guide/getting-started) · [接入 AI 客户端](https://derrors.github.io/iphone-control/guide/mcp-clients) · [工具一览](https://derrors.github.io/iphone-control/guide/tools) |+| 入门 | [什么是 iphone-control](https://derrors.github.io/iphone-control/guide/what-is-iphone-control) · [限制](https://derrors.github.io/iphone-control/guide/what-is-iphone-control#限制) · [快速开始](https://derrors.github.io/iphone-control/guide/getting-started) · [接入 AI 客户端](https://derrors.github.io/iphone-control/guide/mcp-clients) · [工具一览](https://derrors.github.io/iphone-control/guide/tools) || 使用 | [配置](https://derrors.github.io/iphone-control/guide/configuration) · [通知](https://derrors.github.io/iphone-control/guide/notifications) · [自动解锁](https://derrors.github.io/iphone-control/guide/auto-unlock) || 安装 | [Docker](https://derrors.github.io/iphone-control/deploy/docker) · [从源码 / 二进制](https://derrors.github.io/iphone-control/deploy/source) · [macOS](https://derrors.github.io/iphone-control/deploy/macos) · [数据与备份](https://derrors.github.io/iphone-control/deploy/backup) || 问题 | [常见问题](https://derrors.github.io/iphone-control/troubleshoot/faq) · [排错(英文)](docs/troubleshooting.md) · [Issues](https://github.com/Derrors/iphone-control/issues) |@@ -157,16 +138,6 @@ iphone-control mcp-config # 打印 `claude mcp add`| 开发 | [贡献指南](CONTRIBUTING.md) · [架构](docs/architecture.md) · [关键取舍](docs/decisions.md) · [更新日志](CHANGELOG.zh-CN.md) || 许可证 | [THIRD_PARTY.md](THIRD_PARTY.md):vendor 组件、版本和许可证 |-## 限制--- 一台主机接一部手机;不要同时运行两份(或其他基于 usbmuxd 的工具)连同一部手机-- 免费 Apple ID 的描述文件 7 天有效。重签是自动的,但 Apple ID 会话失效后要运行 `login`-- 手机重启后,要人工解锁一次,并输一次密码允许 UI 自动化,这是 iOS 的要求-- 登录 Apple ID 默认用公共的第三方 anisette 服务;可设 `ICTL_ANISETTE_URL` 换成自建服务-- 容器以 root 运行:要访问 USB 设备节点,拔插后还要能重启 usbmuxd-- HID 后备路线要 iOS 27 及以上;更早的 iOS 全部经 WebDriverAgent 操作-- macOS 上:只支持 Apple Silicon(Intel Mac 没测过,也没有预编译包),二进制没有经过苹果公证,守护进程在终端里前台运行(还没有 launchd 配置),不能用 Docker(没有 USB 直通);数据在 `~/.local/share/iphone-control`-> [!WARNING]> 这个工具能完全控制你的手机,agent 可能点到付款、删除、发送这类按钮,请在 MCP 客户端里保持工具调用确认。本项目与 Apple 无关;只在你自己的设备和账号上使用。开启自动解锁前请先读 [SECURITY.md](SECURITY.md)。@@ -177,5 +148,3 @@ iphone-control mcp-config # 打印 `claude mcp add`## License[MIT](LICENSE),第三方组件见 [THIRD_PARTY.md](THIRD_PARTY.md)。--<p align="right">(<a href="#readme-top">回到顶部</a>)</p>diff --git a/docs/images/banner.svg b/docs/images/banner.svgnew file mode 100644index 0000000..2009b9d--- /dev/null+++ b/docs/images/banner.svg@@ -0,0 +1,68 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 320" width="1280" height="320" role="img" aria-label="iphone-control: Let AI agents operate a real iPhone">+ <title>iphone-control</title>+ <defs>+ <linearGradient id="bn-bg" x1="0" y1="0" x2="1" y2="1">+ <stop offset="0" stop-color="#0b1220"/>+ <stop offset="1" stop-color="#082f49"/>+ </linearGradient>+ <radialGradient id="bn-glow" cx="0.86" cy="0.5" r="0.5">+ <stop offset="0" stop-color="#22d3ee" stop-opacity="0.28"/>+ <stop offset="1" stop-color="#22d3ee" stop-opacity="0"/>+ </radialGradient>+ <pattern id="bn-dots" width="24" height="24" patternUnits="userSpaceOnUse">+ <circle cx="2" cy="2" r="1.2" fill="#67e8f9" fill-opacity="0.12"/>+ </pattern>+ <linearGradient id="bn-title" x1="0" y1="0" x2="1" y2="0">+ <stop offset="0" stop-color="#ffffff"/>+ <stop offset="1" stop-color="#a5f3fc"/>+ </linearGradient>+ <linearGradient id="logo-bg" x1="0" y1="0" x2="1" y2="1">+ <stop offset="0" stop-color="#22d3ee"/>+ <stop offset="1" stop-color="#0e7490"/>+ </linearGradient>+ <linearGradient id="logo-screen" x1="0" y1="0" x2="0" y2="1">+ <stop offset="0" stop-color="#164e63"/>+ <stop offset="1" stop-color="#082f49"/>+ </linearGradient>+ <filter id="logo-shadow" x="-20%" y="-20%" width="140%" height="140%">+ <feDropShadow dx="0" dy="10" stdDeviation="14" flood-color="#083344" flood-opacity="0.35"/>+ </filter>+ </defs>+ <rect width="1280" height="320" rx="24" fill="url(#bn-bg)"/>+ <rect width="1280" height="320" rx="24" fill="url(#bn-dots)"/>+ <rect width="1280" height="320" rx="24" fill="url(#bn-glow)"/>+ <!-- 右侧:点击波纹 -->+ <g fill="none" stroke="#22d3ee">+ <circle cx="1104" cy="160" r="40" stroke-opacity="0.55" stroke-width="3"/>+ <circle cx="1104" cy="160" r="76" stroke-opacity="0.32" stroke-width="2"/>+ <circle cx="1104" cy="160" r="112" stroke-opacity="0.16" stroke-width="2"/>+ </g>+ <circle cx="1104" cy="160" r="14" fill="#fbbf24"/>+ <g transform="translate(72 64) scale(0.375)">+ <!-- app-icon tile -->+ <rect width="512" height="512" rx="116" fill="url(#logo-bg)"/>++ <!-- phone -->+ <g filter="url(#logo-shadow)">+ <rect x="148" y="64" width="216" height="384" rx="48" fill="#ffffff"/>+ </g>+ <rect x="166" y="82" width="180" height="348" rx="32" fill="url(#logo-screen)"/>+ <rect x="226" y="98" width="60" height="18" rx="9" fill="#0b1220"/>++ <!-- AI sparkle on the screen -->+ <path d="M256 168 C263 214 278 229 324 236 C278 243 263 258 256 304 C249 258 234 243 188 236 C234 229 249 214 256 168 Z" fill="#ffffff"/>+ <path d="M310 150 C312 164 316 168 330 170 C316 172 312 176 310 190 C308 176 304 172 290 170 C304 168 308 164 310 150 Z" fill="#67e8f9"/>++ <!-- home indicator -->+ <rect x="226" y="404" width="60" height="8" rx="4" fill="#ffffff" fill-opacity="0.55"/>++ <!-- tap: amber ripple with a pointer -->+ <circle cx="366" cy="372" r="74" fill="#fbbf24" stroke="#ffffff" stroke-width="14"/>+ <path d="M346 330 L346 410 L366 390 L382 424 L398 416 L382 384 L410 382 Z" fill="#0b1220" stroke="#0b1220" stroke-width="6" stroke-linejoin="round"/>+ </g>+ <g font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Source Han Sans SC', 'WenQuanYi Zen Hei', Helvetica, Arial, sans-serif">+ <text x="300" y="138" font-size="64" font-weight="700" fill="url(#bn-title)">iphone-control</text>+ <text x="302" y="194" font-size="28" font-weight="600" fill="#e0f2fe">Let AI agents operate a real iPhone</text>+ <text x="302" y="238" font-size="20" fill="#94a3b8">One Rust binary · Linux and macOS · No Xcode · No jailbreak</text>+ </g>+</svg>diff --git a/docs/images/banner.zh-CN.svg b/docs/images/banner.zh-CN.svgnew file mode 100644index 0000000..cebb43b--- /dev/null+++ b/docs/images/banner.zh-CN.svg@@ -0,0 +1,68 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 320" width="1280" height="320" role="img" aria-label="iphone-control: 让 AI agent 操作一台真实的 iPhone">+ <title>iphone-control</title>+ <defs>+ <linearGradient id="bn-bg" x1="0" y1="0" x2="1" y2="1">+ <stop offset="0" stop-color="#0b1220"/>+ <stop offset="1" stop-color="#082f49"/>+ </linearGradient>+ <radialGradient id="bn-glow" cx="0.86" cy="0.5" r="0.5">+ <stop offset="0" stop-color="#22d3ee" stop-opacity="0.28"/>+ <stop offset="1" stop-color="#22d3ee" stop-opacity="0"/>+ </radialGradient>+ <pattern id="bn-dots" width="24" height="24" patternUnits="userSpaceOnUse">+ <circle cx="2" cy="2" r="1.2" fill="#67e8f9" fill-opacity="0.12"/>+ </pattern>+ <linearGradient id="bn-title" x1="0" y1="0" x2="1" y2="0">+ <stop offset="0" stop-color="#ffffff"/>+ <stop offset="1" stop-color="#a5f3fc"/>+ </linearGradient>+ <linearGradient id="logo-bg" x1="0" y1="0" x2="1" y2="1">+ <stop offset="0" stop-color="#22d3ee"/>+ <stop offset="1" stop-color="#0e7490"/>+ </linearGradient>+ <linearGradient id="logo-screen" x1="0" y1="0" x2="0" y2="1">+ <stop offset="0" stop-color="#164e63"/>+ <stop offset="1" stop-color="#082f49"/>+ </linearGradient>+ <filter id="logo-shadow" x="-20%" y="-20%" width="140%" height="140%">+ <feDropShadow dx="0" dy="10" stdDeviation="14" flood-color="#083344" flood-opacity="0.35"/>+ </filter>+ </defs>+ <rect width="1280" height="320" rx="24" fill="url(#bn-bg)"/>+ <rect width="1280" height="320" rx="24" fill="url(#bn-dots)"/>+ <rect width="1280" height="320" rx="24" fill="url(#bn-glow)"/>+ <!-- 右侧:点击波纹 -->+ <g fill="none" stroke="#22d3ee">+ <circle cx="1104" cy="160" r="40" stroke-opacity="0.55" stroke-width="3"/>+ <circle cx="1104" cy="160" r="76" stroke-opacity="0.32" stroke-width="2"/>+ <circle cx="1104" cy="160" r="112" stroke-opacity="0.16" stroke-width="2"/>+ </g>+ <circle cx="1104" cy="160" r="14" fill="#fbbf24"/>+ <g transform="translate(72 64) scale(0.375)">+ <!-- app-icon tile -->+ <rect width="512" height="512" rx="116" fill="url(#logo-bg)"/>++ <!-- phone -->+ <g filter="url(#logo-shadow)">+ <rect x="148" y="64" width="216" height="384" rx="48" fill="#ffffff"/>+ </g>+ <rect x="166" y="82" width="180" height="348" rx="32" fill="url(#logo-screen)"/>+ <rect x="226" y="98" width="60" height="18" rx="9" fill="#0b1220"/>++ <!-- AI sparkle on the screen -->+ <path d="M256 168 C263 214 278 229 324 236 C278 243 263 258 256 304 C249 258 234 243 188 236 C234 229 249 214 256 168 Z" fill="#ffffff"/>+ <path d="M310 150 C312 164 316 168 330 170 C316 172 312 176 310 190 C308 176 304 172 290 170 C304 168 308 164 310 150 Z" fill="#67e8f9"/>++ <!-- home indicator -->+ <rect x="226" y="404" width="60" height="8" rx="4" fill="#ffffff" fill-opacity="0.55"/>++ <!-- tap: amber ripple with a pointer -->+ <circle cx="366" cy="372" r="74" fill="#fbbf24" stroke="#ffffff" stroke-width="14"/>+ <path d="M346 330 L346 410 L366 390 L382 424 L398 416 L382 384 L410 382 Z" fill="#0b1220" stroke="#0b1220" stroke-width="6" stroke-linejoin="round"/>+ </g>+ <g font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Source Han Sans SC', 'WenQuanYi Zen Hei', Helvetica, Arial, sans-serif">+ <text x="300" y="138" font-size="64" font-weight="700" fill="url(#bn-title)">iphone-control</text>+ <text x="302" y="194" font-size="28" font-weight="600" fill="#e0f2fe">让 AI agent 操作一台真实的 iPhone</text>+ <text x="302" y="238" font-size="20" fill="#94a3b8">一个 Rust 二进制 · Linux 和 macOS · 不需要 Xcode · 不越狱</text>+ </g>+</svg>diff --git a/docs/images/demo-stopwatch.webp b/docs/images/demo-stopwatch.webpnew file mode 100644index 0000000..97559c4Binary files /dev/null and b/docs/images/demo-stopwatch.webp differdiff --git a/docs/images/features.svg b/docs/images/features.svgnew file mode 100644index 0000000..23a88c2--- /dev/null+++ b/docs/images/features.svg@@ -0,0 +1,62 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 388" width="1200" height="388" role="img" aria-label="One binary: Linux or macOS. No Xcode, no paid developer account, no jailbreak.; 15 MCP tools: Screenshots, taps, swipes, text input, buttons, apps, URLs, element tree.; Fewer round trips: Actions return the settled screen; iphone_batch runs 20 steps per call.; Runs unattended: Recovers from replugs and reboots; re-signs WDA before it expires.; HID fallback: Screenshots, taps and keys keep working via CoreDevice (iOS 27+).; doctor and alerts: Checks every layer from USB to WDA; Telegram or Bark when it needs you.">+ <defs>+ <linearGradient id="cd-bg" x1="0" y1="0" x2="0" y2="1">+ <stop offset="0" stop-color="#0f1b2d"/>+ <stop offset="1" stop-color="#0b1220"/>+ </linearGradient>+ <linearGradient id="cd-icon" x1="0" y1="0" x2="1" y2="1">+ <stop offset="0" stop-color="#22d3ee"/>+ <stop offset="1" stop-color="#0e7490"/>+ </linearGradient>+ </defs>+ <g font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Source Han Sans SC', 'WenQuanYi Zen Hei', Helvetica, Arial, sans-serif">+ <g transform="translate(0 0)">+ <rect x="0.5" y="0.5" width="375" height="175" rx="18" fill="url(#cd-bg)" stroke="#155e75" stroke-opacity="0.7"/>+ <rect x="24" y="24" width="48" height="48" rx="12" fill="url(#cd-icon)"/>+ <g transform="translate(24 24)"><polyline points="14,17 22,24 14,31" fill="none" stroke="#fff" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/><line x1="25" y1="32" x2="35" y2="32" stroke="#fff" stroke-width="3.5" stroke-linecap="round"/></g>+ <text x="24" y="104" font-size="22" font-weight="700" fill="#f0f9ff">One binary</text>+ <text x="24" y="132" font-size="15" fill="#94a3b8">Linux or macOS. No Xcode, no paid</text>+ <text x="24" y="155" font-size="15" fill="#94a3b8">developer account, no jailbreak.</text>+ </g>+ <g transform="translate(412 0)">+ <rect x="0.5" y="0.5" width="375" height="175" rx="18" fill="url(#cd-bg)" stroke="#155e75" stroke-opacity="0.7"/>+ <rect x="24" y="24" width="48" height="48" rx="12" fill="url(#cd-icon)"/>+ <g transform="translate(24 24)"><g fill="#fff"><rect x="13" y="13" width="10" height="10" rx="2.5"/><rect x="25" y="13" width="10" height="10" rx="2.5"/><rect x="13" y="25" width="10" height="10" rx="2.5"/><rect x="25" y="25" width="10" height="10" rx="2.5" fill-opacity="0.6"/></g></g>+ <text x="24" y="104" font-size="22" font-weight="700" fill="#f0f9ff">15 MCP tools</text>+ <text x="24" y="132" font-size="15" fill="#94a3b8">Screenshots, taps, swipes, text input,</text>+ <text x="24" y="155" font-size="15" fill="#94a3b8">buttons, apps, URLs, element tree.</text>+ </g>+ <g transform="translate(824 0)">+ <rect x="0.5" y="0.5" width="375" height="175" rx="18" fill="url(#cd-bg)" stroke="#155e75" stroke-opacity="0.7"/>+ <rect x="24" y="24" width="48" height="48" rx="12" fill="url(#cd-icon)"/>+ <g transform="translate(24 24)"><g fill="#fff"><path d="M11 15 L23 24 L11 33 Z"/><path d="M24 15 L36 24 L24 33 Z"/></g></g>+ <text x="24" y="104" font-size="22" font-weight="700" fill="#f0f9ff">Fewer round trips</text>+ <text x="24" y="132" font-size="15" fill="#94a3b8">Actions return the settled screen;</text>+ <text x="24" y="155" font-size="15" fill="#94a3b8">iphone_batch runs 20 steps per call.</text>+ </g>+ <g transform="translate(0 212)">+ <rect x="0.5" y="0.5" width="375" height="175" rx="18" fill="url(#cd-bg)" stroke="#155e75" stroke-opacity="0.7"/>+ <rect x="24" y="24" width="48" height="48" rx="12" fill="url(#cd-icon)"/>+ <g transform="translate(24 24)"><path d="M35 24 A11 11 0 1 1 31.8 16.2" fill="none" stroke="#fff" stroke-width="3.5" stroke-linecap="round"/><polyline points="33,9 33,17 25,17" fill="none" stroke="#fff" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/></g>+ <text x="24" y="104" font-size="22" font-weight="700" fill="#f0f9ff">Runs unattended</text>+ <text x="24" y="132" font-size="15" fill="#94a3b8">Recovers from replugs and reboots;</text>+ <text x="24" y="155" font-size="15" fill="#94a3b8">re-signs WDA before it expires.</text>+ </g>+ <g transform="translate(412 212)">+ <rect x="0.5" y="0.5" width="375" height="175" rx="18" fill="url(#cd-bg)" stroke="#155e75" stroke-opacity="0.7"/>+ <rect x="24" y="24" width="48" height="48" rx="12" fill="url(#cd-icon)"/>+ <g transform="translate(24 24)"><path d="M24 11 L37 18 L24 25 L11 18 Z" fill="#fff"/><polyline points="11,24 24,31 37,24" fill="none" stroke="#fff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><polyline points="11,30 24,37 37,30" fill="none" stroke="#fff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-opacity="0.6"/></g>+ <text x="24" y="104" font-size="22" font-weight="700" fill="#f0f9ff">HID fallback</text>+ <text x="24" y="132" font-size="15" fill="#94a3b8">Screenshots, taps and keys keep</text>+ <text x="24" y="155" font-size="15" fill="#94a3b8">working via CoreDevice (iOS 27+).</text>+ </g>+ <g transform="translate(824 212)">+ <rect x="0.5" y="0.5" width="375" height="175" rx="18" fill="url(#cd-bg)" stroke="#155e75" stroke-opacity="0.7"/>+ <rect x="24" y="24" width="48" height="48" rx="12" fill="url(#cd-icon)"/>+ <g transform="translate(24 24)"><polyline points="9,25 17,25 21,14 27,34 31,25 39,25" fill="none" stroke="#fff" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/></g>+ <text x="24" y="104" font-size="22" font-weight="700" fill="#f0f9ff">doctor and alerts</text>+ <text x="24" y="132" font-size="15" fill="#94a3b8">Checks every layer from USB to WDA;</text>+ <text x="24" y="155" font-size="15" fill="#94a3b8">Telegram or Bark when it needs you.</text>+ </g>+ </g>+</svg>diff --git a/docs/images/features.zh-CN.svg b/docs/images/features.zh-CN.svgnew file mode 100644index 0000000..593e080--- /dev/null+++ b/docs/images/features.zh-CN.svg@@ -0,0 +1,62 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 388" width="1200" height="388" role="img" aria-label="一个二进制: Linux 或 macOS 上直接运行 不需要 Xcode、付费账号,不越狱; 15 个 MCP 工具: 截图、点击、滑动、输入中文 按键、管理 App、读元素树; 少走往返: 操作后顺带返回稳定后的界面 iphone_batch 一次最多 20 步; 无人值守: 拔插、重启、WDA 崩溃后自动恢复 描述文件到期前自动重签; HID 后备: WDA 不可用时截图、点击、按键 改走 CoreDevice(iOS 27+); 诊断与通知: doctor 从 USB 到 WDA 逐层检查 需要你时发 Telegram 或 Bark">+ <defs>+ <linearGradient id="cd-bg" x1="0" y1="0" x2="0" y2="1">+ <stop offset="0" stop-color="#0f1b2d"/>+ <stop offset="1" stop-color="#0b1220"/>+ </linearGradient>+ <linearGradient id="cd-icon" x1="0" y1="0" x2="1" y2="1">+ <stop offset="0" stop-color="#22d3ee"/>+ <stop offset="1" stop-color="#0e7490"/>+ </linearGradient>+ </defs>+ <g font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Source Han Sans SC', 'WenQuanYi Zen Hei', Helvetica, Arial, sans-serif">+ <g transform="translate(0 0)">+ <rect x="0.5" y="0.5" width="375" height="175" rx="18" fill="url(#cd-bg)" stroke="#155e75" stroke-opacity="0.7"/>+ <rect x="24" y="24" width="48" height="48" rx="12" fill="url(#cd-icon)"/>+ <g transform="translate(24 24)"><polyline points="14,17 22,24 14,31" fill="none" stroke="#fff" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/><line x1="25" y1="32" x2="35" y2="32" stroke="#fff" stroke-width="3.5" stroke-linecap="round"/></g>+ <text x="24" y="104" font-size="22" font-weight="700" fill="#f0f9ff">一个二进制</text>+ <text x="24" y="132" font-size="15" fill="#94a3b8">Linux 或 macOS 上直接运行</text>+ <text x="24" y="155" font-size="15" fill="#94a3b8">不需要 Xcode、付费账号,不越狱</text>+ </g>+ <g transform="translate(412 0)">+ <rect x="0.5" y="0.5" width="375" height="175" rx="18" fill="url(#cd-bg)" stroke="#155e75" stroke-opacity="0.7"/>+ <rect x="24" y="24" width="48" height="48" rx="12" fill="url(#cd-icon)"/>+ <g transform="translate(24 24)"><g fill="#fff"><rect x="13" y="13" width="10" height="10" rx="2.5"/><rect x="25" y="13" width="10" height="10" rx="2.5"/><rect x="13" y="25" width="10" height="10" rx="2.5"/><rect x="25" y="25" width="10" height="10" rx="2.5" fill-opacity="0.6"/></g></g>+ <text x="24" y="104" font-size="22" font-weight="700" fill="#f0f9ff">15 个 MCP 工具</text>+ <text x="24" y="132" font-size="15" fill="#94a3b8">截图、点击、滑动、输入中文</text>+ <text x="24" y="155" font-size="15" fill="#94a3b8">按键、管理 App、读元素树</text>+ </g>+ <g transform="translate(824 0)">+ <rect x="0.5" y="0.5" width="375" height="175" rx="18" fill="url(#cd-bg)" stroke="#155e75" stroke-opacity="0.7"/>+ <rect x="24" y="24" width="48" height="48" rx="12" fill="url(#cd-icon)"/>+ <g transform="translate(24 24)"><g fill="#fff"><path d="M11 15 L23 24 L11 33 Z"/><path d="M24 15 L36 24 L24 33 Z"/></g></g>+ <text x="24" y="104" font-size="22" font-weight="700" fill="#f0f9ff">少走往返</text>+ <text x="24" y="132" font-size="15" fill="#94a3b8">操作后顺带返回稳定后的界面</text>+ <text x="24" y="155" font-size="15" fill="#94a3b8">iphone_batch 一次最多 20 步</text>+ </g>+ <g transform="translate(0 212)">+ <rect x="0.5" y="0.5" width="375" height="175" rx="18" fill="url(#cd-bg)" stroke="#155e75" stroke-opacity="0.7"/>+ <rect x="24" y="24" width="48" height="48" rx="12" fill="url(#cd-icon)"/>+ <g transform="translate(24 24)"><path d="M35 24 A11 11 0 1 1 31.8 16.2" fill="none" stroke="#fff" stroke-width="3.5" stroke-linecap="round"/><polyline points="33,9 33,17 25,17" fill="none" stroke="#fff" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/></g>+ <text x="24" y="104" font-size="22" font-weight="700" fill="#f0f9ff">无人值守</text>+ <text x="24" y="132" font-size="15" fill="#94a3b8">拔插、重启、WDA 崩溃后自动恢复</text>+ <text x="24" y="155" font-size="15" fill="#94a3b8">描述文件到期前自动重签</text>+ </g>+ <g transform="translate(412 212)">+ <rect x="0.5" y="0.5" width="375" height="175" rx="18" fill="url(#cd-bg)" stroke="#155e75" stroke-opacity="0.7"/>+ <rect x="24" y="24" width="48" height="48" rx="12" fill="url(#cd-icon)"/>+ <g transform="translate(24 24)"><path d="M24 11 L37 18 L24 25 L11 18 Z" fill="#fff"/><polyline points="11,24 24,31 37,24" fill="none" stroke="#fff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><polyline points="11,30 24,37 37,30" fill="none" stroke="#fff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-opacity="0.6"/></g>+ <text x="24" y="104" font-size="22" font-weight="700" fill="#f0f9ff">HID 后备</text>+ <text x="24" y="132" font-size="15" fill="#94a3b8">WDA 不可用时截图、点击、按键</text>+ <text x="24" y="155" font-size="15" fill="#94a3b8">改走 CoreDevice(iOS 27+)</text>+ </g>+ <g transform="translate(824 212)">+ <rect x="0.5" y="0.5" width="375" height="175" rx="18" fill="url(#cd-bg)" stroke="#155e75" stroke-opacity="0.7"/>+ <rect x="24" y="24" width="48" height="48" rx="12" fill="url(#cd-icon)"/>+ <g transform="translate(24 24)"><polyline points="9,25 17,25 21,14 27,34 31,25 39,25" fill="none" stroke="#fff" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/></g>+ <text x="24" y="104" font-size="22" font-weight="700" fill="#f0f9ff">诊断与通知</text>+ <text x="24" y="132" font-size="15" fill="#94a3b8">doctor 从 USB 到 WDA 逐层检查</text>+ <text x="24" y="155" font-size="15" fill="#94a3b8">需要你时发 Telegram 或 Bark</text>+ </g>+ </g>+</svg>diff --git a/website/en/guide/what-is-iphone-control.md b/website/en/guide/what-is-iphone-control.mdindex aaeb429..212df51 100644--- a/website/en/guide/what-is-iphone-control.md+++ b/website/en/guide/what-is-iphone-control.md@@ -35,10 +35,29 @@ Other models and iOS versions should work but are untested — [reports](https:/The CLI, `doctor` output and MCP tool results are currently in Simplified Chinese. Agents handle this fine.:::-## What it does not do+## Limitations++**Things you do on the phone**- It does not bypass any iOS security: trusting the computer, enabling Developer Mode, trusting the developer certificate and enabling UI automation each need you on the phone once.-- The first unlock after a reboot (BFU) always needs a person.+- After the phone reboots, the first unlock (BFU) always needs a person, who also enters the passcode once more to allow UI automation. iOS requires this.++**Usage**++- One phone per host. Don't run two copies of iphone-control, or other usbmuxd-based tools, against the same phone.- Games, maps and video have no element tree; agents work from screenshots and coordinates there.+- The HID fallback needs iOS 27 or later. On older iOS everything goes through WebDriverAgent, and actions fail while it restarts.+- Free Apple ID profiles last 7 days. Re-signing is automatic, but an expired Apple ID session needs `login`.+- Apple ID logins use a public third-party anisette server by default; set `ICTL_ANISETTE_URL` to use your own, see [Configuration](./configuration).+- The Docker container runs as root: it needs the USB device nodes and restarts its own usbmuxd after replugging.++**macOS**++- Apple Silicon only; Intel Macs are untested.+- The prebuilt binary isn't notarized; a copy downloaded with a browser needs its quarantine flag removed first.+- The daemon runs in a terminal (no launchd configuration yet); no Docker (no USB passthrough).+- Set the phone's charging limit to 100%: with the 80% limit, USB drops about once a minute.++Other differences from Linux: [macOS known differences](../deploy/macos#known-differences).Next: [Getting Started](./getting-started).diff --git a/website/guide/what-is-iphone-control.md b/website/guide/what-is-iphone-control.mdindex 24c7f2d..76c7fa9 100644--- a/website/guide/what-is-iphone-control.md+++ b/website/guide/what-is-iphone-control.md@@ -35,10 +35,29 @@ iphone-control 让 AI agent(例如 Claude)操作一台用数据线接在 Lin命令行、`doctor` 的输出和 MCP 工具返回的文字目前都是简体中文。:::-## 不能做什么+## 限制++**需要你在手机上操作**- 不绕过任何 iOS 安全机制:信任电脑、打开开发者模式、信任开发者证书、启用 UI 自动化,都需要你在手机上亲自操作一次。-- 手机重启后第一次解锁(BFU)必须人工完成。+- 手机重启后,第一次解锁(BFU)必须人工完成,还要再输一次密码允许 UI 自动化,这是 iOS 的要求。++**使用**++- 一台主机接一部手机。不要对同一部手机同时运行两份 iphone-control,也不要同时用其他基于 usbmuxd 的工具。- 游戏、地图、视频这类界面没有元素树,agent 只能看截图按坐标操作。+- HID 后备路线要 iOS 27 及以上;更早的 iOS 全部经 WebDriverAgent 操作,WDA 重启期间操作会失败。+- 免费 Apple ID 的描述文件 7 天有效。重签是自动的,但 Apple ID 会话失效后要运行 `login` 重新登录。+- 登录 Apple ID 默认用公共的第三方 anisette 服务,可以设 `ICTL_ANISETTE_URL` 换成自建服务,见[配置](./configuration)。+- Docker 容器以 root 运行:要访问 USB 设备节点,拔插后还要重启容器里的 usbmuxd。++**macOS**++- 只支持 Apple Silicon,Intel Mac 没测过。+- 预编译二进制没有经过苹果公证,用浏览器下载的要先去掉隔离标记。+- 守护进程要在终端里前台运行,还没有 launchd 配置;不能用 Docker(没有 USB 直通)。+- 手机的充电上限要改成 100%,开着「80% 上限」时 USB 大约每分钟断开一次。++和 Linux 的其他区别见 [macOS 已知差异](../deploy/macos#已知差异)。下一步:[快速开始](./getting-started)。