Hacker News new | ask | show | jobs
by nanagojo 2018 days ago
Man I wish Xcode was a decent IDE
8 comments

You're hardly the only one, 3.3/5 star rating on the Mac App Store and the #1 downloaded developer tool. Can't live with it, can't live without it.
I think JetBrains has a XCode replacement but I dont do Apple development so I'm not sure if its possible to use it as a complete replacement for developing macOS, iOS and IPadOS apps. Anyone have first hand experience?
AppCode. I used to use it a lot, and in many respects it's just plain better than Xcode. You can one-click install a plugin to use vim bindings, for example, whereas in Xcode you have to strip out the code signature so that you can install a third party plugin for vim bindings because, I don't know, fuck you I guess.

The problem was that AppCode was always a few months behind Xcode in terms of Swift support, and Interface Builder never really worked right. So the workflow was to have them both open at the same time and constantly switch back and forth, which at the end of the day just isn't great.

I wish Xcode didn't suck, but it does in so many ways. Not much to be done about it.

I wish Jetbrains could do what they did with .NET which is Resharper. A plugin for Visual Studio that brought IntelliJ like features and smartness to it. It was a breeze.

Unfortunately I don't think XCode is built to handle third party vendors plugins and it never will (which is why Appcode exists in the first place).

Xcode used to allow plugins but then disabled them in favor of relatively useless Source Editor extensions which offers nowhere near the capability required to build something like R#.

A stand-alone IDE like AppCode is the way forward, JetBrains usually take a while to get their new IDE's up to speed and catch up with the latest language & platform features, but afterwards is able to add a tonne of smarts and maintain feature parity fairly quickly as they've done with Rider which offers a much nicer & faster UX than VS.NET/R#.

My Visual Studio is an happy boy without Resharper bloat, never got the point of it.
Every time I upgrade Visual Studio I try running it without Resharper. I’m finding I can last longer before I give in each time but I always do end up installing it.
Maybe, but people say similar things for e.g. using Vim over an IDE too, though...
Xcode used to have this awesome plugins ecosystem (Alcatraz) that was built by 3rd party devs.

Then XcodeGhost happened. They try to replace it with Xcode Source Editor Extension but that one is just not as good as Alcatraz

That is appCode, which has some pretty big limitations last I used it. For instance, you can only edit XIB files in XCode.

But AppCode's navigation and refactoring capabilities are much better.

I tried using AppCode on our massive project at work (several million lines of code), and at the time (admittedly a few years ago), I couldn't even start working on any code until it indexed the entire project. I let it run while on a machine I wasn't using and it took several hours to complete. Xcode also takes hours to complete indexing on our project, but it runs in the background instead of blocking the UI so I could get to work immediately with a new checkout of the source.
Any comparisons after indexing is done?
As I say, it's been a few years, but if I recall, it just generally didn't feel like a Mac application. It worked alright and was basically calling the same tools under-the-hood as Xcode does. But there was nothing compelling about it that I could see when I tested it. Perhaps it's better now? I should probably give it another look.
I used Xcode recently and it's gotten a lot better. It's still not as good as IntelliJ or AppCode but it's usable.

I remember around when Swift came out, Xcode was so bad that I couldn't even use it because typing was ~1 character/second and it would crash every few minutes. It's definitely recovered from that and I can actually type without lag now.

Xcode had no such problems with Objective-C though... Maybe Swift's design deserves some blame here for years of subpar developer experience.
Manipulating the source code leads to invoking the Swift compiler to generate the information required to drive the rich editing experience. I have found SourceKit’s performance in complex projects, especially those where there are a lot of third-party libraries or frameworks you’re linking against, to be pretty disappointing. Especially when you’re working with many ObjC dependencies.

Like many of Apple’s developer tools, if you stick to the happy path, performance is great. Practically that means compiling your source into a single Swift module and keeping the number of modules low. If you are a “basic” iOS or macOS app with just a couple of 3p libraries things work great. Real world projects are drastically more messy...

It wasn't until Swift came out that autocomplete for ObjC in Xcode finally started to function at a useful level.

Autocomplete in Swift is still broken but I don't think it's an issue with the language itself (autocomplete is probably easier to implement in Swift given the nature of the language).

The autocomplete and syntax highlighting feature completely stops working sometimes. It’s beyond frustrating
Simply:

CMD+,

Locations

Derived Data

CMD+Q Xcode

Delete!!! Derived Data

Restart Xcode

Why not Clean Build Folder

  CMD+B
success!!
I have a shell alias for

  mv ~/Library/Developer/Xcode/DerivedData ~ && rm -rf ~/DerivedData &
And I use it constantly. This approach is fast because it does the actual rm in the background so I can relaunch Xcode right away.
I have a source editor extension that has no job but to clean this clean this ;)
Sounds like an unusual problem. I cannot remember having that problem and I was using Swift from the beginning.

For me Xcode is quite nice. Didn’t like AppCode. Not sure why people are so enthusiastic about it. What does it give besides better code completion? Development is a lot more than code completion.

Odd, I don’t really like IDEs but I think Xcode is among the least shitty IDEs out there. Too many IDEs have just terrible GUI design.
Xcode’s main issues are its bugs (which are inexcusable) and the project file format which is way too hard to work with.

Why aren’t files in groups sorted by default? Why does sorting them cause large sections of the project file to be rewritten? Why do I need to add files through the UI? (Why can’t I create them in the terminal and have them just show up?)

I know that groups vs folder references play a role here but most projects use groups, and groups are a terrible experience.

It all leads to constant merge conflicts and files just accidentally getting removed from groups and nobody being able to tell in code review. They need to fix the project file.

Yeah, Xcode has some annoying bugs occasionally but in terms of UX, it's miles ahead of anything else I've used.
Same here - I like working with XCode because the native UI!
Curious what your issues are? I personally love Xcode for C++.
A lot of the issues I encounter are mostly related to Swift and SourceKit more than they are Xcode. The language server will start choking after a mildly complex project and highlighting and autocomplete will stop working. Sometimes it won’t recover until you delete derived data. Xcode itself is missing some modern features for navigation and a plug-in system however. I’d also like it if the Xcode team could learn what software patches are rather than releasing an 11gb version for every update.
Xcode is so dammed slow and buggy. I use JetBrains AppCode for everything but storyboard editing.
Does AppCode support live preview?
If there's anything you can credit the Google team for, it's using IntelliJ as the basis of the Android IDE.
Which is one of the reasons I am happy not having to deal with it every single day.

Android Studio requires a gaming rig to run properly, Android developer forums are filled with discussions on how to not use it in pain.

IntelliJ is amazing though.
I would have preferred them sticking with Eclipse. Sure, the Android plugins for Eclipse were pretty bad, but that was all Googles fault. They could have just fixed their plugins.
Instead of an excellent one you mean?
Me too. I don’t understand how they release an IDE without Vim emulation or some support for plugins that enable Vim emulation. It’s quite miserable. Last time I checked you had to root the app to install a Vim extension.
FWIW you can invoke SourceKit LSP with a vim/nvim plugin now and have a really nice Swift editor inside nvim. It doesn’t work with third-party packages yet though so I mostly use it for one off scripts.
Thanks. Didn't know about SourceKit LSP.
So weird. I guess it might be because 99.9% of swift developers want as little vim as possible in their lives.
What’s the connection between swift and Vim? Why would they be anti-Vim?
Most people are naturally anit-vim, because it’s so unintuitive to the uninitiated. It’s not because they use swift.
*unsign the app
Re-sign the app using your own certificate.