Phone-Harness Enables AI Agents to Directly Control and Automate iPhones
A new open-source tool called "phone-harness" has been released, allowing AI agents like Claude Code to directly control and automate physical iPhones. The tool enables agents to interact with any iOS application without requiring official APIs or jailbreaking the device. This development bridges the gap between LLM-based coding agents and mobile device automation, opening up new possibilities for automated testing and agentic workflows on iOS. It demonstrates how desktop-based AI agents can extend their capabilities to physical mobile hardware. Technically, phone-harness operates by capturing the iPhone Mirroring window on macOS, using Apple's Vision framework for OCR to identify on-screen text coordinates, and executing taps via HID-level CGEvents. This allows the AI agent to see the screen and simulate human touches natively.
## BACKGROUND
Claude Code is an agentic developer tool by Anthropic that runs in the terminal or IDE to write code and execute commands. Traditionally, automating iOS apps required complex testing frameworks like Appium or official developer APIs, which limited the flexibility of general-purpose AI agents.