AppCode: IntelliJ for Objective C!

by Tom van ZummerenJuly 6, 2011

AppCode logoWhen I started writing my first iPhone app, I was quite disappointed with XCode. This is because I have been using IntelliJ for the past five years, which I love working with ever since I first started using it. XCode is the IDE you have to use in order to develop iOS and Mac apps. Until recently there weren’t any real alternatives.

Compared to IntelliJ, XCode looks very basic to me because it has no handy shortcuts, good refactoring tools or other handy features that I’m used to in IntelliJ. XCode doesn’t look like a software tool that’s developed by Apple at all. It is clear Steve Jobs was not involved creating this tool.

After I came to the conclusion I was probably just spoiled by IntelliJ, I accepted the fact that XCode wasn’t as good. Furthermore, I was learning a new language and had to accept that I’m in a different world now. Recently XCode 4 was released, which admittedly has improved a lot compared to XCode 3. But, as I found out, XCode 4 still needs to come a long way to even come close to the usability of IntelliJ.

AppCode to the rescue?

This is where AppCode comes in, it is developed by the same people as IntelliJ: JetBrains. With AppCode they basically built an IDE very similar to IntelliJ, but instead of Java it supports Objective C. Currently it is still in some kind of pre-beta stage they call EAP (Early Access Program), but already it looks very very promising.

At first I was very sceptical about AppCode, because I didn’t believe in an IDE not part of the standard iOS SDK package. Because the power of how Apple distributes new releases of the SDK is, that the tools are also updated with every release. So you will never run into compatibility issues. A third party IDE would probably have a hard time catching up to the latest iOS version every release. It will quickly fall behind.

I suspect the guys from JetBrains have also foreseen this problem and came up with a very clever solution. They basically built the entire IDE “on top” of XCode. This means:

  • AppCode doesn’t have its own project file format, but instead it opens existing XCode projects
  • It behind the scenes uses the XCode compiler to build your app
  • It leaves editing NIB files (Interface Builder) entirely up to XCode

This is very cool because this way there is no risk or effort involved using AppCode instead of XCode. Just install AppCode, open your existing XCode project and you can start using it! If you find something that really only XCode can do (for example distribute to the App Store) you can still switch back to XCode to do that task.

Things XCode just doesn`t do

I kept a list of the most important things I discovered in AppCode so far that XCode just doesn’t support. It’s like discovering IntelliJ’s features all over again, which is nice.

  • Realtime compiler errors without having to build first
  • Quickfixes: it even warns you when you for example have allocated an object but you didn’t release it anywhere
  • Ability to quickly override or implement methods from a superclass or protocol
  • Grays out unused code (imports, methods, classes etc)
  • Generates init methods, properties, etc.
  • Optimize imports
  • Refactoring of a method signature
  • Other kinds of refactorings like extracting a method, renaming variables, extracting protocols, putting code inline …
  • Shortkey to quickly navigate to a class, you even can use abbreviations like “MC” when you’re looking for a class named MyClass for example
  • Code formatting
  • Live templates
  • … and a lot more

Things AppCode does way better

Also a lot of features are just done better in AppCode compared to XCode. Here are the ones I most appreciate.

  • Much much better auto completion, it also does smart complete
  • Saves files automatically
  • Use of bright, more distinctive colors in code
  • Debugs code just like IntelliJ
  • Subversion/Git/Mercurial support just like IntelliJ
  • Much better, more logical shortkeys. And there’s also many more of them!
  • Easier to create new classes, protocols, etc
  • Switching between .m and .h files keeps the cursor at the same method
  • “Find usages” actually finds usages instead of simply doing a text search like XCode does
  • Doesn’t show useless compiler warnings like the one for unused local variables
  • … and again much more of course

Few things you will still need XCode for

Even though you probably want to marry AppCode after using it for a while, you can’t do a complete switch at this moment. I found out that there are still some things you will still need to go back to XCode for every once in a while.

  • Interface Builder (yes, because XCode 4 has Interface Builder built right in)
  • Deploying to iPhone (but I suspect it’s just a bug that this is not possible right now with AppCode)
  • Building AD HOC or Appstore distributions
  • Browse developer documentation
  • plist file support

In conclusion

Overall I think AppCode is a 99% replacement of XCode, offers a much better user experience and makes you more productive. You don’t need to convert anything to AppCode, it just picks up where you left off with XCode. I personally use it all the time now when I’m developing iPhone apps, but I leave XCode open as well to do the very few things AppCode can’t (yet) do. I certainly recommend AppCode to other people who are currently developing with XCode. Check out the EAP at http://www.jetbrains.com/objc/