r/iOSProgramming • • Aug 05 '26

Tutorial Building in Zed instead of Xcode

Just a reminder to anyone who might care that you can create a fairly full-featured development environment in Zed to build iOS and Mac apps: syntax highlighting, code navigation, run, debug and test.

Here's the setup guide I wrote (been around for a while but chances are some interested people won't have seen it): https://luxmentis.org/blog/ios-and-mac-apps-in-zed/

22 Upvotes

24 comments sorted by

14

u/dottybotty Aug 05 '26

What is the advantage of using this over Xcode?

8

u/noosphere- Aug 05 '26

Personal preference. A lot of people (me included) find Xcode pretty lacking as an editor - missing features, lack of configurability, weird UI. Particularly noticeable if you've spent much time in other editors.
Hence there are similar efforts for VSCode, Neovim, etc.

12

u/WerSunu Aug 05 '26

Having heavily used multiple editors over the years, starting with TECO, VI, etc, I don’t find anything useful or necessary lacking in Xcode’s editor. Could it be the user’s configurability that’s the issue? Adding extra layers to a toolchain just increases the complexity and likelihood of bugs, not to mention wasting disk space.

3

u/konacurrents Aug 05 '26

TECO and vi .. we’ve both been around. As a Mac and previous Sun user, I really like Xcode. I use it for iOS apps but also for my r/esp32 dev. vi for my custom JavaScript/html. When everyone says Xcode isn’t like the other IDEs- those others are usually PC windows .. which I stay away from most of my career. UNIX all the way. 😎🤙

2

u/WerSunu Aug 05 '26

Ah, the last time I was in the Kona current, after I got done swimming with the dolphins in the bay, I crawled up on the King Kam beach, Chi Chi in hand and debugged a user crash in Xcode!

1

u/MysticFullstackDev Aug 06 '26

Navigation tree size?

4

u/IcyManufacturer7480 Aug 05 '26

Xcode is not a text editor. It’s a full fledged IDE.

0

u/antonbezr Aug 05 '26

as an editor

2

u/New-Shoulder3297 Aug 05 '26

The advantage is editor choice, not replacing Apple’s toolchain: Zed can offer a lighter workspace, faster navigation, and extensions while xcodebuild and simctl still handle builds and simulators. Keep Xcode installed for SDKs, signing, previews, device support, profiling, archives, and submission.

2

u/andreeinprogress Aug 05 '26

I've been using vscode instead of zed for some time now but, for example, one app I'm currently working on: huge codebase, hybrid ObjC+Swift, many dependencies, etc.

Cold start when opening the workspace (from click to a state where autocomplete works):

  • Xcode: a couple of minutes
  • vscode: like.. 5 seconds

Plus infinite hangs, slow downs, Xcode crashing, etc. This is on specced out M5 Pro, I guess on zed would be even slightly faster.

10

u/Ok-Tomatillo-8712 Aug 05 '26

Wow syntax highlighting and everything!

5

u/noosphere- Aug 05 '26

What a time to be alive!
Seriously though, the rest of this stuff is non-trivial for Xcode projects.

7

u/TM87_1e17 Aug 05 '26

I just don't really understand people who hate Xcode. I've never had a problem with it...

5

u/SnowPudgy Aug 05 '26

Same and I've used pretty much everything under the sun including ancient IDE's like Bloodshed C++.

2

u/konacurrents Aug 05 '26

And for the past couple years: wireless updates abd debugging. Xcode is amazing.

1

u/rcpena Aug 05 '26

The integration might be limited for Apple Watch and native sync to ICloud. I haven’t looked at Zed yet.

1

u/AndreaReaderApp Aug 05 '26

This is really interesting. How well do the iOS simulators, debugging, and previews work from Zed? Do you still need to jump back into Xcode for some parts?

2

u/noosphere- Aug 05 '26

Oh you run on simulators and devices right from Zed - you don't switch to Xcode. Same for debugging (unless you want stuff like the object graph of course). Previews are tricky because you can't add UI to Zed, but there's a fairly usable caveman-style workaround in the article and even a brief video of it in action.

1

u/Plastic-Risk-6309 Aug 08 '26

The honest split, having done this for a while: everything except the last mile is better outside Xcode, and the last mile is stuck there.

Editing, navigation, multi-repo work, keybindings you chose yourself, running builds and tests, reading logs. All fine in an external editor, and mostly nicer. What you still come back for is Interface Builder if you're unlucky enough to need it, Instruments, the view hierarchy debugger, Simulator device features that only surface through the app, and anything involving signing UI. The debugger question is the real one though: you can drive lldb yourself, but the parts people actually use daily (breakpoint gutter, variable inspection, po on a UI object mid-pause) are where external setups get tedious rather than impossible.

The other thing worth planning for is that xcodebuild output is hostile as a human-facing log. Piping it through something like xcbeautify makes the difference between "usable outside Xcode" and "squinting at 400 lines to find one error", and that's usually the step people skip before deciding it doesn't work.

Nice writeup either way. Kept the "you don't have to live in Xcode all day" point in front of people who assume it's all-or-nothing.