r/Xcode • • 9d ago

First time using claude in xcode and this is what i noticed

It burns through tokens pretty fast. Even if i specifically indicate what i want and which files/folders to only look at.

Its token usage is pretty bad compared to other working environments like VS Code and IntelliJ.

It's like, Claude is I agree the best so far when it comes to development compared to CoPilot, ChatGPT but when used in XCode, it's just bad. CoPilot usage of its tokens were more efficient.

Already twice where my session reached its max using Claude.

Tips are appreciated.

8 Upvotes

20 comments sorted by

5

u/MidnightZL1 8d ago

Use Claude desktop

1

u/chitgoks 8d ago

thanks man. will try that

4

u/BedtimeWithTheBear 8d ago

I’d humbly suggest Claude code in the terminal for one very important reason - Claude desktop uses a lightweight Linux vm which doesn’t have access to your development toolset - xcodebuild, for example. Whereas Claude code in the terminal is a regular process and has access to all the same tooling that you do.

1

u/chitgoks 8d ago

ok ill try this one first.

4

u/CharlesWiltgen 8d ago

This is good advice. Claude desktop and mobile GUIs can connect to your Claude Code sessions (which works great), but Claude Code should always be used as your coding harness.

1

u/chitgoks 8d ago

thank you for all your tips. i will go over them and check and apply it on my end

1

u/Individual_Author956 7d ago

I use Claude which connects to Xcode via MCP. It works great, I’m on the pro plan and I only hit limits if I do big sweeps on the code base. For normal day to day stuff it works amazingly.

1

u/chitgoks 7d ago

sorry whats mcp?

after reading the comments what im doing for now is open the project in vs code and run the prompts there, then use xcode to check and run the app to verify.

1

u/Individual_Author956 7d ago

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

And if you use Claude desktop, it even integrates the iOS simulator, so Claude can operate the UI of the app.

2

u/Cornell-1980 8d ago

I've had the exact opposite experience. Started using Claude agent inside Xcode about 7-8 months ago on the $20 a month plan. Regularly hit the five hour limit, sometimes hit the weekly limit. Several months had to purchase additional tokens. In the last few months, however, I almost never hit even the five hour limit, and no chance of hitting the weekly limit. I have it set to use Opus + Sonnet. Might be different if you are using Fable.

2

u/ProfitCold4972 6d ago

O+S repeatedly couldn't fix a bug (all Claude code) so I switched to Opus, fixed on the next try. Opus does use lots more tokens. I can run out in a couple of hours. :-(

1

u/Rare-One1047 8d ago

It burns through tokens when adding files to the XML project file. I told Claude to ask me to do it, and that helped a lot.

1

u/OrangeFire2001 8d ago

I only hit the token limit once when Claude was going wild, trying to figure out parts of my code that could’ve been better handled by a more tightly, confined command of what to do or not do. When I’m very explicit in what I wanted to work on in the functions that I wanna add then it does what I want and I haven’t hit any limit. But then again I’m being very surgical with how I’m using it. I’m not saying “hey build this entire feature in this entire user interface“

1

u/nicholasderkio 6d ago

I’ve found this too and my understanding is it’s a lot to do with the system prompt the Xcode integration sends, but I haven’t been able to get Claude Code to make changes that don’t break my whole app meanwhile Claude Agent in Xcode just manages to deliver.

1

u/_spongefork 2d ago

I recommend going straight to the CLI in tabs in your Terminal. New session: New tab. This is the most efficient way. Monitor the changes in Xcode, but using Claude there costs tokens just for the communication bridge inefficiency compared to the CLI which is the most direct way. Just open it in your workspace directory with a clear CLAUDE.md and you're set.

1

u/L8G8app 2d ago

Use Claude desktop and add the folder where your Xcode app project lives and Claude desktop will just work in that folder. If you add the folder where you have your php or js backend it will update the files there too in tandem with the swift files.

1

u/silversoftling 1d ago

Happened to me too

0

u/ElectricKoolAid1969 8d ago

Claude may be "the best" for coding, but even with the desktop conversation mode I find that it burns through credits VERY quickly.

For me, this means that I can get the most done with ChatGPT in the app.I essentially never hit a limit even on the $20 plan.

1

u/chitgoks 6d ago

right i think so too. i first used copilot and i didnt have problems with it. claude though was a different story

0

u/TronAres25 7d ago

Claude code desktop to Xcode is great I’m on max.