Skip to content

By PromptFission2 min read

agent-sim boots Apple's iOS simulator on a Linux VM so coding agents can tap through apps

A Rust tool runs the iOS simulator runtime on x86-64 Linux with no Mac and no GPU, then hands agents the screen as text. Its known-issues file is the best part.


Testing an iOS app has always meant owning or renting a Mac. agent-sim, from the GitHub account Developing-Gamer, runs Apple’s iOS simulator runtime on an ordinary x86-64 Linux VM and gives a coding agent a command line and an MCP server to drive it. The README calls the project early, and its record of what went wrong on the way is unusually detailed.

How it works

agent-sim sits on x86Sim, which stacks three other projects: Darling supplies the macOS kernel interfaces, dynarmic translates the simulator’s ARM code to x86, and Mesa’s CPU Vulkan driver draws Metal through a translation layer. Apple’s 8 GB runtime is downloaded from Apple during setup and is not in the repo.

What agent-sim adds is the part an agent touches. snapshot reads the accessibility tree of the app in front, plus any web page it shows and the system UI, and prints one element per line with a handle such as @e2. The agent then runs tap @e2, type, scroll or wait. Each action replies with the screen that follows. There is also a pool of phones to check out and release, and a browser page that streams the screen.

The rest is tuning. The runtime is translated ahead of time, the screen is drawn at 2x, and transparency and motion effects are reduced. On an 8 vCPU AMD Zen 5 cloud VM the author’s benchmark file reports a 12 to 13 second boot, Settings scrolling at 54.7 fps and a touch reaching the screen in 13.5 ms.

The bug list

The known issues file reads like a debugging diary. Every web page crashed at first because WebKit tries to reserve 16 GB of address space at startup and the reservation failed; the fix was WebKit’s own switch to turn that off. More than one CPU core stayed busy with nothing on screen because a service called sleepd had been left out of the slimmed-down service list, and SpringBoard was retrying it about 780 times a second. In the benchmark file, the step that restores it and the other services apps need is the one where touch latency drops from 64 ms to 13.5 ms.

Open problems are listed with the same care. Video does not play in Safari. Safari froze once in about 150 launches and navigations. Twice in about six hours of heavy use, the whole phone stopped because Darling’s server process exited, cause unknown.

Try it yourself

The repo is Apache-2.0, apart from its x86Sim patches, which are GPL-3.0-or-later. According to the README you need an x86-64 machine with Ubuntu 24.04, at least 8 CPUs, 16 GB of memory and 60 GB of disk, and setup takes about half an hour. App Store downloads will not run because they are encrypted; you need a development, ad hoc or enterprise build, or a simulator build.

We have not installed agent-sim or booted a phone with it. This is based on the README and the repo’s benchmark and known-issues documents.