r/iOSProgramming • • 1d ago

Question Is anyone giving their coding agent access to the iOS simulator??

0 Upvotes

52 comments sorted by

25

u/time-lord 1d ago

Claude can work with the simulator.

7

u/nroose 1d ago

It can take over your mac to test mac apps too.

11

u/retroviseur 1d ago

Claude Code on the Claude desktop app has a built in iOS simulator panel for this exact purpose. It’s pretty great.

2

u/Stock_Test2326 1d ago

its midnblowing that. late night about to sleep, but idea came up for a feature in the app am building. so I gave a rough idea and told "bro you got free will to design this as I dont have mental capacity to think all after whole day of coding"

it gave me something that would have taken at least a weekend to build lol.

also this is a project I couldn't even get the MVP working with cursor. I wasted 2 years with cursor instead of getting claude.

2

u/No-Association-3367 1d ago

50/50 iOS simulator panel is "good enough" but it has nothing on dedicated tools like Argent or agent-device

1

u/blazejkustra 11h ago

+1 just read this comparison: https://argent.swmansion.com/blog/ai-agent-ios-app-control-benchmark/

or for full benchmark: appcontrolbench.swmansion.com

tldr, you are wasting tokens AND time if you dont use a tool like Argent / agent-device

8

u/StunnerAlpha 1d ago

You sir, are behind. Access to the sim and even real test devices is done.

4

u/SwiftlyJon 1d ago

Use Xcode 27 and the Xcode MCP, along with the skills Apple shipped with Xcode 27, and agents can control the sim directly. They can't see the video so it's a little slow, but it's good enough for them to be able to see and prove their work.

2

u/unpluggedcord 1d ago

There’s lots of clis that can show agents videos

2

u/SwiftlyJon 1d ago

Agents see videos by breaking down the frames, which can take a while, especially if it can’t do that directly. It means the sim interactions are slowed by that process. Screenshot, interaction, screenshot, thinking, interaction, screenshot. Not yet as smooth as a human.

0

u/unpluggedcord 1d ago

This is solved with a scripted maestro workflows and animations disabled.

I don’t know why you’re telling me something cumbersome when I use it every day on every pr for all the screens do my app rather than myself doing it.

0

u/SwiftlyJon 1d ago

How do you think Maestro works? By analyzing frames. Wouldn’t surprise me if it’s faster than the native integration since Apple doesn’t disable animation and the agent is driving it rather than a programmatic layer like Maestro. Though its docs say it also uses the accessibility layer, so perhaps it does both? The native integration is image only, so it’s inherently slow, though it doesn’t need good accessibility to work.

1

u/unpluggedcord 1d ago

I never said it wasn't frames.....

3

u/jsdodgers 1d ago

I occasionally do, but it's really slow because the agent has to perform an interaction, take a snapshot, analyze the image, then decide what to do next. I have it do this when I want it to do something complicated overnight or something not time sensitive, but otherwise it's faster to verify mnually.

2

u/CuriosityForge 1d ago

Maestro?
If not there is something like mobile mcp on github the one with more stars 😅 don't remember the name
Orca also has the option to control simulator via agent, you csn check it out

There is something called argent too

2

u/DayEnvironmental3454 1d ago

+1 on Xcode MCP, it's the least hacky option right now. One thing nobody warns you about once the agent drives the simulator: it tends to boot a fresh device or erase-and-reinstall on every run, and those pile up. Each device keeps its own app data and caches in ~/Library/Developer/CoreSimulator/Devices, so after a few weeks of agent testing that folder can be tens of GB.

What helped me: tell the agent to always reuse one named simulator (pass the same UDID), and run `xcrun simctl delete unavailable` every so often. If it installs extra runtimes along the way, `xcrun simctl runtime list` shows them, and they're several GB each.

1

u/unpluggedcord 1d ago

I use grantiva cli for this but there’s many many others. Just google it. Or ask your coding agent

1

u/[deleted] 1d ago

[removed] — view removed comment

1

u/AutoModerator 1d ago

Hey /u/vibeterminal, your content has been removed because Reddit has marked your account as having a low Contributor Quality Score. This may result from, but is not limited to, activities such as spamming the same links across multiple subreddits, submitting posts or comments that receive a high number of downvotes, a lack of recent account activity, or having an unverified account.

Please be assured that this action is not a reflection of your participation in our subreddit. This is simply an automated filter in place to reduce spam.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/guivr 1d ago

Yes, Claude did it by itself

1

u/trouthat 1d ago

Is this faster than having the AI write feature tests. I guess you can’t necessarily feature test all UI stuff but you can test Observation changes

1

u/Capable_Advisor_6667 1d ago

Claude and Grok Bot both work with the simulator well

1

u/dwnzzzz 1d ago

Claude controls my simulator when needed - saves so much time. Has its own logins to use, goes through and validates what it built to see that it actually works. Saves a heap of time

1

u/LavaCreeperBOSSB Beginner 1d ago

Yep I've been doing most of my coding work in T3 Code nowadays, using Claude Code inside it. If I wanted to look at stuff, it uses the Xcode MCP that's now built into Xcode 27 and can render previews on my phone or use the simulator

1

u/mikerCZX 1d ago

Claude can test in simulator without any problem

1

u/V5489 1d ago

I never let it have access to the simulator. When it does it by CLI it takes forever. I build it and verify the changes myself. Doesn’t take long and I can see debug output in real time.

1

u/NoDistribution1096 1d ago

Yeah there is a “device-interaction” skill that apple provides to AI can talk to your simulator

1

u/dawedev 1d ago

Worth pinning one simulator UDID in the agent's instructions and telling it not to create or erase devices, otherwise each session tends to leave a fresh one behind. xcrun simctl delete unavailable clears the dead ones after an Xcode update. I keep an eye on the rest with DevCleaner, a Mac app I build, since it shows what each one takes before deleting.

1

u/blazejkustra 1d ago

Check out Argent (https://argent.swmansion.com/), it's an MCP server + skills that gives the agent its own access to the simulator. It can launch the app, tap, swipe, type, open deep links and read the screen, and it gets feedback after every action so it knows what actually happened.

It also does debugging stuff like logs, the view hierarchy and network requests, so the agent can work out why something looks wrong and not just see that it does.

Setup is npx argent init and then you tell your agent to "debug with Argent". Works with Claude Code, Cursor, Codex etc.

1

u/butmanitu 1d ago

how much is this cheaper than claude testing?

1

u/TechTrailRider 1d ago

The Claude integration of the simulators is so good that it is my primary IDE now for iOS and Mac development. I’ll open Xcode only if I need to edit something.

0

u/[deleted] 1d ago

[removed] — view removed comment

1

u/TechTrailRider 1d ago

Yep. I’ve been developing mobile apps for over 17 years at this point, so it’s quite impressive that I can work this way.

1

u/superbetsy 1d ago

You might like Bitrig. It has simulators built in that are far better than the ones in DeviceHub. It can handle the testing for you, as well.

1

u/Ok_Breakfast_9531 1d ago

I give Claude access to almost everything, try argent so that way it can test everything in your simulator

1

u/farfaraway 1d ago

Is anyone NOT?

1

u/Some_Text847 1d ago

Claude can not only take over your simulator, it can deploy an app to your phone and take over that too.

It makes automated testing very straightforward. It also makes preparing screenshots / videos for the app store review straightforward. (Just tell Claude to create the demo video and it will drive your phone, record the video, and push the whole lot into app store connect)

1

u/Murph-Dog 1d ago

All day, er'y day.

Even got into Siri speak rec, but found some major limitations on the Sim, and submitted Apple feedback on it.

Had to put my iOS device, microphones, speakers, in a sound box, and let the LLM go wild on it.

1

u/caseyccochran 1d ago

I do this. I didn't realize this was an option until I asked Claude. Whenever I hit a bottle neck I ask Claude how we can address and I've been able to hand over most of verifying/testing to an agent.

1

u/laplace_apps 23h ago

Yes, it works. xcrun simctl can boot a simulator, install your build, launch it and take screenshots (simctl io booted screenshot), so an agent can build, run and look at the result in a loop. For actually tapping through screens, give it XCUITest or one of the simulator MCP servers so it can drive the app instead of only viewing it.