Why I don't like Xcode

Published: 2022-11-15 10:30:30

I realized I have to re-iterate my position on Xcode. So here's a brief note about why I don't like it.

Why I don't like Xcode

I repeatedly run into iOS developers who never tried another IDE than Xcode and they're confused why I don't like Xcode. So here's a short list. I could say much more (also about the UI and UX) but here are the points that are more related to IDE features.

Context: I'm working on multiple complex projects in the 100k loc to 500k loc range and here're some things that happen way too often:

  • Auto completion completely doesn't work in some files
  • Symbol lookup doesn't work (e.g. Xcode doesn't know the struct or class when I try to find information on it)
  • Symbol search doesn't work (this literally never works. I've switched to using text based search for all things)
  • The app compiles but Xcode still lists 3-4 compile errors in the sidebar. They stay there until I restart Xcode and clean the build folder
  • Weird compile errors that disappear when I clean the build folder
  • Swift Package Manager integration is awful. Change one package file, and Xcode needs 2min (where the UI is unresponsive) to reload all the packages and do some weird calculations
  • Everything is slow. Searching for things, typing, the editor. Compare that to the speed of VSCode, where all interactions are super fast
  • Sometimes the unit test buttons disappear (the ones that appear next to the unit test function name), which means I can't run individual tests anymore.
  • Its still the case that compiler error messages are completely in the wrong place for complex type errors
  • SwiftUI preview still doesn't work properly in many cases
  • Sometimes Xcode needs forever to figure out that there's an error in something I wrote. Not while I'm typing, not when I've saved, only once I started compiling. Then it compiles, it fails, it needs another 5sec, and then the error message appears. That's a terrible feedback loop.

Apart from that, there's no useful plugin / extension interface. I'd like to have auto-reformat on save as a plugin, way better vim bindings (I mean, we finally got vim bindings but they're awful), bookmarks (I sometimes use disabled debugger breakpoints as bookmarks, but that's not really a feature).

There's obviously more, but here's the thing. I also work on a sizeable Rust project (60k loc), and while Rust analyser needs longer for the initial indexing of the project, everything else after that is way better than Xcode. VSCode is faster, smoother, auto completion works much more reliably, refactoring works great, the IDE already shows errors while I'm typing or right after I've saved. Also, when I save the code is formatted based on the guidelines, which is a godsend. I've tried to set up VSCode as a Xcode alternative, but the Swift sourcekit-lsp is way worse than Rust-Analyzer. Also, running and debugging is a pain then.