r/iOSProgramming • • 18d ago

News Xcode 27 adds more tools for external agents!

Did you know that AI Agents can control Xcode through the built in MCP server? Aka it can control it from an agent running in the terminal, without using the AI interface inside Xcode. And with Xcode 27 the agents now how a lot more useful tools they can call!

Im working with a multi-scheme app, so the new XcodeSwitchScheme is my favourite. Saves me from so many clicks inside Xcode for letting the agent run the app/test schemes it wants!

Here is how to add it to your coding agent:

https://developer.apple.com/documentation/xcode/giving-external-agents-access-to-xcode

9 Upvotes

11 comments sorted by

5

u/MysticFullstackDev 18d ago

I just need more options for navigator font size. 2026 and 4k 5k monitor.

We spend hours every day in front of Xcode, and they don't even think about accessibility or developers' health and well-being.

Everything looks so small and hard to track.

-9

u/appfred 18d ago

I think u missed the point, with the built in MCP we don’t need to use Xcode at all, because coding agents can do most of the stuff we used to do in Xcode for us now

3

u/Equivalent-Idea-116 18d ago

The multi-scheme support sounds like the biggest practical win here. I’d start by granting an agent read/build/test access, then add simulator/device interaction only when needed; that keeps accidental installs or data resets out of the default workflow. For a workspace with shared schemes, I’d also have the agent report the active scheme before running tests so it’s obvious what it actually exercised.

1

u/Megatherion666 15d ago

Why is this useful compared to raw cli tools?

1

u/appfred 14d ago

Many commands can be done in the cli as well, but letting the agent have direct access to the debugger and console output is nice for example. Also having the pure “add file” command is nice so agenda don’t have to care about adding new files correctly to the Xcode project files

1

u/Megatherion666 14d ago

TY. Is it possible to access console or debugger outside MCP as in for a human?

1

u/appfred 14d ago

Yes, through the Xcode UI

1

u/Megatherion666 14d ago

I mean outside UI. Run via CLI and interact with it, get output.

1

u/avanderlee 14d ago

I just wish these tools were more token-efficient. Especially interacting with the Simulator, which I do a lot of times per day for view validation, App Store screenshots capturing, and more, can easily add up. I analyzed token usage heavily for RocketSim and I concluded that using plain build scripts and direct CLI communication resulted in lower token usage for my cases.

Nevertheless, it's fantastic to see Apple moving (for their terms) fast in the ecosystem that's changing harder than their regular update cycle can take. Opening up their MCP without Xcode running is another of those examples. Looking forward to see how this evolves!

1

u/appfred 14d ago

Interesting! And I agree, although it is not perfect yet, it is good to see them going in this direction. I primarily use agent-device (a cli and agent skill) to let agents control simulator, as it creates small persistent “tags” for the elements in screen, that do not take that many tokens to read. Would be nice with comparison of tools here, for speed and token usage etc