r/iOSProgramming • u/gordonmcdowell • Aug 10 '26
Question When to use Xcode AI as opposed to relying on Claude Code?
I'm told by Xcode's AI Claude "this interface is wired into your running Xcode session, and your problem is a measurement problem on real hardware" as a reason to use Xcode AI instead of Claude Code as a means of using Claude.
So (for example) there's access to Instruments that Claude app does NOT have but Xcode does?
Does anyone know of an actively maintained list of when-to-actually-use-Xcode-AI?
UPDATE: I've been using Xcode AI (Claude Opus no idea exactly which Opus) today as opposed to Claude Code with various MCP I'd previously installed (and can't recall which ones), and today had big success with optimization I have to attribute to Xcode AI integration that Claude Code had been lacking.
Is an iOS/Mac/tvOS game, and I'd been poking away at tvOS optimization for (part-time) weeks, but with too much action on screen fps would drop under 30. Is just 2D but I don't know enough about tvOS to be surprised my 2D game with lots of sprites performed worse than a fancy 3D game. I'd have guessed it should have run smoothly but really was never sure I wasn't just taxing Apple TV hardware... the least powerful Apple hardware we have in our home.
Here is what Xcode's Claude Opus figured out: "The cause was UIKit's focus engine walking your entire SpriteKit node tree every frame. Not physics, not AI, not netcode, not the renderer, and not resolution — all of which I measured and ruled out along the way, several of them after confidently predicting otherwise."
It had been dipping to 12fps and now can maintain 60fps. That was it. And it did it by pausing the game and reviewing the stack.
I assume Claude Code couldn't do that, or it would have? Certainly I've spent more than a day with Claude Code and Fable trying to optimize for Apple TV.
"The tvOS focus engine is walking your entire SpriteKit node tree, testing every node for focus eligibility and computing a coordinate-space frame for each one."
Anyway thanks for input on this. CharlesWiltgen mentioned Axiom and I'll be checking that out.
1
u/PressureAppropriate Aug 11 '26
Don't you need to use Claude Code to get access to the latest models?
3
u/Plastic-Risk-6309 Aug 11 '26
the split i've settled on: xcode's assistant wins when the answer needs the live session (build graph, instruments traces, the current issues panel), claude code wins when the work is multi-file edits plus running your own tooling in a loop. i haven't seen a maintained when-to-use list. the part neither does well is telling you the app actually behaves right after the build.
2
u/start_select Aug 11 '26
I just use VSCode with Copilot and then build/run/test from the command line. I have Xcode open for occasional tasks here or there.
But it’s mostly backgrounded unless I want to see a view hierarchy or visualize memory.
3
u/dat_tae Aug 10 '26
The agent built in to Xcode has extra information exposed to it by Apple, and can obviously control Xcode. I'm no expert but I would always use it over the Claude Code app.
1
u/valleyman86 Aug 10 '26
I was using it and it was nice but I stopped because it would crash in the middle of the work and I would even lose my prompt. Happened way too often that I was tracking prompts and asked it to keep a prompt history which obviously uses more tokens lol. Now I just use codex directly and review in Xcode.
1
u/[deleted] Aug 10 '26
[removed] — view removed comment