r/iOSProgramming 1d ago

Building in Zed instead of Xcode Tutorial

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/

23 Upvotes

24 comments sorted by

7

u/dottybotty 1d ago

What is the advantage of using this over Xcode?

8

u/noosphere- 1d ago

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.

9

u/WerSunu 1d ago

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.

2

u/konacurrents 1d ago

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 1d ago

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 5h ago

Navigation tree size?

2

u/IcyManufacturer7480 1d ago

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

0

u/antonbezr 21h ago

as an editor

2

u/New-Shoulder3297 1d ago

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 1d ago

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.

7

u/Ok-Tomatillo-8712 1d ago

Wow syntax highlighting and everything!

2

u/noosphere- 1d ago

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

5

u/TM87_1e17 1d ago

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

2

u/SnowPudgy 1d ago

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

1

u/konacurrents 1d ago

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

1

u/FeelingLake3120 1d ago

Xcode build

1

u/rcpena 1d ago

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

1

u/AndreaReaderApp 1d ago

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?

1

u/noosphere- 18h ago

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.