# ai-passport-iphone-use **Repository Path**: dashingmonkey/ai-passport-iphone-use ## Basic Information - **Project Name**: ai-passport-iphone-use - **Description**: 让 AI 直接操控真实 iPhone / iPad:Windows 接收 AirPlay 画面,AI Passport 作为蓝牙键鼠,通过 MCP 供 Agent 点击、滚动与输入(无需 Xcode / 越狱) - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-11-11 - **Last Updated**: 2026-11-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

AI Passport iPhone Use

AI Passport iPhone Use

Let an AI drive a real iPhone or iPad — no Xcode, no jailbreak

Built for the AI Passport hardware: Windows takes the AirPlay stream directly, and
AI Passport acts as a Bluetooth keyboard and mouse. You watch the screen; an agent taps, scrolls and types over MCP.

Version 1.0.1 Firmware 1.0.1-p1 Windows MCP MIT

Quick start · Calibration · Agent integration · Capabilities · Build

[简体中文](README.zh_CN.md) ## Why this one - **Built around AI Passport.** It is a USB Bluetooth HID bridge: USB into the PC, Bluetooth to the phone, turning the computer's mouse and keyboard into input iOS accepts. The unit has a small screen and three buttons (OK stops input and resumes it, holding DOWN for six seconds resets the Bluetooth pairing), and serves both an iPhone and an iPad across phone upgrades. - **No Xcode, developer account, jailbreak, WebDriverAgent or Appium.** Nothing is installed on the phone and USB debugging stays off. - **The phone does not have to sit next to the PC.** Video goes over AirPlay on the LAN, input over Bluetooth; only AI Passport plugs into the computer. - **One interface for every agent.** The app ships an MCP server, so Claude Code, CodeBuddy, WorkBuddy and any other MCP client connect as-is instead of needing a bespoke adapter. - **Same flow on iPhone and iPad.** Measured on 20–57 px buttons: 0.37–4.67 px landing error; pointer moves land within 0.57–7 px. - **Every action reports back.** Each tap returns `click_effect` (did the screen change?), each drag returns `page_changed`, so an agent does not have to guess. ## How it works

PC connects to AI Passport over USB, AI Passport connects to the iPhone over Bluetooth, and video plus audio return to the PC over wireless mirroring

Commands leave the PC and arrive at the phone as Bluetooth keyboard and mouse input from AI Passport; video and audio come back over AirPlay on the LAN. Because it is a video stream, screenshots work even when the desktop window is covered; because it is standard Bluetooth HID, the phone needs no app. Accuracy comes from a software loop: screenshot, locate the cursor, move, look again, click only when inside tolerance. ## What it can and cannot do | Works | Notes | | --- | --- | | Tap, long press, drag, swipe, type ASCII | Pass `target_radius` to tighten tolerance; short `fast` taps take about 0.6 s | | Launch apps, back gesture, HOME | `swipe_back`, `open_app_switcher`, `press_key HOME` | | Limitations | Why | | --- | --- | | **No absolute-coordinate tapping** | It is a simulated Bluetooth mouse: there is no "touch (x, y)" channel, only move-then-click corrected by vision. Very small (<20 px), low-contrast or animated targets may fail or cost 0.5–6 s | | One calibration, then keep it | A new phone, a firmware version change or a different "pointer speed" invalidates it (`CALIBRATION_BINDING_CHANGED`). Without calibration the agent may only observe | | Text input follows the active keyboard | Keystrokes go through the current input source: with a Chinese pinyin keyboard letters become candidates and Space/digits are consumed. Switch the device to English (US) for reliable typing | | iOS ignores HID Return | It neither submits a search field nor inserts a newline (it commits a pending composition instead). Tap the on-screen confirm button | | Popups swallow the next click | Shopping and social apps raise full-screen overlays between two actions, so take a screenshot after every action | | Portrait only | The phone must be unlocked, in portrait, with AssistiveTouch on and "Always Hide Pointer" off | | Windows only | Windows 10/11; both the receiver and the UI are Windows programs | ## Quick start 1. Connect AI Passport over USB and pair `AI Passport` in the phone's Bluetooth settings. 2. On the phone enable `Settings → Accessibility → Touch → AssistiveTouch` (turn off "Always Show Menu"), then under `Pointer Control` turn off "Automatically Hide Pointer". 3. Open Screen Mirroring in Control Center and pick the receiver name shown by the app. 4. Launch the app and press **Start calibration** on the AI Control page (next section). 5. Manual control works right away; for automation, copy the MCP configuration from the AI Control page. Connection details are in the app's **Connection guide** (bottom-left). ## Calibration (mandatory) One calibration per phone is what buys the accuracy: - Start from a new **blank note** on the phone, keyboard dismissed, unlocked, portrait, pointer visible; - Do not touch the phone while it runs; Esc cancels; - The profile is stored per phone and restored after restarts or reconnects, and the button becomes **Recalibrate**. A different phone, a different screen size, a firmware version change or a changed "pointer speed" all invalidate the saved profile (`CALIBRATION_BINDING_CHANGED`). Calibration and pointer marking are local-user-only and never exposed over MCP — without a profile an agent may observe and stop, nothing else. ## Agent integration (MCP) The AI Control page prints a ready-to-paste MCP configuration. Tools cover `screenshot`, `acquire_control`, `move_pointer`, `tap`, `long_press`, `swipe`, `press_key`, `type_text`, `swipe_back` and more; the `initialize` instructions document coordinates, lease rules and the known traps. Two habits save the most time: - **Always read coordinates off the screenshot you just received.** A scaled preview or an older frame is routinely 30–70 px off. - **Anchor, then tap fast.** `move_pointer` to a static high-contrast spot within ~200 px of the target, then `tap(precision:"fast")` — far quicker than a verified tap on a busy background. ## Build The build entry point is `desktop/build.ps1`; run it from PowerShell (or hand that one line to an AI assistant). It needs Node.js 22.12+, Python 3.10+, Rust MSVC and the Visual Studio C++ tools, and writes both editions to `desktop/target/release/`: | File | Runtime | | --- | --- | | `iPhoneUse.exe` | Uses the system WebView2; if missing it offers to download it and verifies the signature | | `iPhoneUse_full.exe` | Embeds WebView2, about 320 MB, not attached to releases | The firmware image is not embedded in the exe: the app looks for `FoloToy-AI-Passport-full.bin` in the `firmware\` folder beside it, so a fresh clone builds the desktop app without ESP-IDF. `tools/build-p1.ps1` compiles the firmware (auto-detecting an activated ESP-IDF 5.5.3, or `-IdfPath`); building never flashes a device. ```powershell .\desktop\build.ps1 -Offline -NoPause -NoLaunch # offline build .\tools\validate.ps1 -Offline # checks only ``` If the execution policy blocks scripts, use `powershell -NoProfile -ExecutionPolicy Bypass -File .\desktop\build.ps1`. ## Third-party sources and licenses The distributed binary contains the third-party components below, each under its own license; the project's own code is MIT. **Related projects.** [iPhoneMirror](https://github.com/RayrenSX/iPhoneMirror) takes the USB + CoreDevice absolute-touch route (GPL-3.0). We studied its protocol details and engineering practice during design but **use no code from it**. [esp32-iphone-agent](https://github.com/onehumanbeing/esp32-iphone-agent) (MIT) shares the Bluetooth HID approach and inspired the device command protocol; no source code is copied. **Receiver and decoding.** [AirPlayServer](https://github.com/xenos1337/AirPlayServer) v1.2.5, commit `85bb8dcbe82f75f40f30bb603255668f9162a8f9`: repository-authored code and copied public headers are MIT, the receiver adapter is written independently by this project (MIT), and origin plus build instructions are in [AirPlay provenance](third_party/airplay-server/SOURCE.md). It bundles **PlayFair (GPL-3.0)** and **libplist (LGPL-2.1-or-later)**, with sources and license texts supplied alongside the receiver. **FFmpeg 8.1.2** is dynamically linked (avcodec/avutil/swscale, LGPL-2.1-or-later, no GPL/nonfree/version3 components); source SHA-256 `464beb5e7bf0c311e68b45ae2f04e9cc2af88851abb4082231742a74d97b524c` (`https://ffmpeg.org/releases/ffmpeg-8.1.2.tar.xz`), supplied with the build configuration at release. **Desktop dependencies.** [mdns-sd](https://crates.io/crates/mdns-sd) (Apache-2.0 OR MIT) handles LAN discovery; the remaining Rust and frontend dependencies keep their own licenses, including MPL-2.0 for `serialport`. The Microsoft Visual C++ runtime follows Microsoft's redistribution terms; Microsoft WebView2 follows its runtime terms (the standard edition uses the system runtime and offers to download it, the full edition embeds 155.0.4283.62). **P1 firmware.** The distributed `firmware/FoloToy-AI-Passport-full.bin` contains [LVGL](https://lvgl.io/) (MIT, Copyright (c) 2025 LVGL Kft), the Espressif managed components `espressif__button`, `esp_lvgl_port`, `esp_codec_dev` and `cmake_utilities` (Apache-2.0), and [ESP-IDF](https://github.com/espressif/esp-idf) (Apache-2.0, some components with additional terms). AirPlay is an Apple protocol and trademark; this project is an unofficial compatible implementation. The app's About page shows this section. ## License [MIT](LICENSE) © 2026 dashingmonkey