For a long time, the only IDE that iOS and OSX developers had was Xcode, and life was okay. Then JetBrains released AppCode. For the last 6 month, I’ve had the opportunity to use AppCode as my primary IDE, and it is head and shoulders above Xcode.
- Code Generation
- File Navigation
- ⌘⇧N – Find in all project files
- ⌘N – Find in all classes
- ⇧⇧ – Find in all project files and display list of recent files
- ⌘E – View a list of recent files
- Renaming Things
Creating new classes in Xcode is the worst. When I’m in the middle of writing a test, the last thing I want to do is lose my train of thought. Since we practice TDD at Atomic, often times I’m writing tests using classes that don’t exist yet or are not yet imported. When I need to create that class in Xcode (to get the tests to compile) I have to find the folder I’d like to add that class to, right click, new file, yadda yadda. Then when I settle on a good method name for that new object, I have to go to the header, declare it, and then stub out the implementation. Finally, I’m ready to navigate to the top of my current file and add the
AppCode takes away all of that pain. When I’m in the middle of a unit test and I need a new class, I simply declare that class and hit ⌥⏎ and specify where to place it. I can then define new methods on that class by hitting ⌥⏎ again. AppCode even brings up a modal allowing you to change that method’s signature and add or remove parameters. When I’m using a class that already exists but I haven’t imported yet, I can use ⌥⏎ again to add that class to my imports.
Xcode file navigation is not awful. You can fuzzy find files using ⌘⇧O, and it works pretty well, but AppCode does it so much better.
AppCode provides several different file finders:
Another Xcode oddity that bugs me is that when I rename a file, the class name remains unchanged. If I want to then rename the class, I have to right-click the class name, choose refactor, and then rename it. Also, refactoring methods to add or remove parameters is completely a manual process in Xcode. I have to navigate to the file I want to change, and manually add the parameter.
In AppCode, I can click a file and hit ⇧F6 and voilá, I’m editing the file name and the class name. If I need to add a new parameter to a method, I can hit ⌘F6 anywhere that method is used in the code to bring up a modal that allows me to add a new parameter. When I update the method, all calls of that method are updated with the new parameter (defaulted to passing NULL or 0).
The only way I’ve found to run a single test in Xcode is to click the tiniest of icons in the breakpoint space of a test file. Of course Xcode has shortcuts for running all of the tests, and usually it doesn’t take too long to run those tests. However, I don’t really care about the other 900 or so other unit tests in my application when I’m writing a new one.
In AppCode I can at least narrow it down to only running all of the tests in the current file using ⌃⇧F10.
When I Still Use Xcode
There are a few things that I still need Xcode for. Firstly, anything to do with core data must still be done in Xcode. I also still use Xcode for any storyboard work. As of AppCode 3, storyboard editing is possible, but I haven’t made the switch to AppCode for my storyboarding needs. Lastly, I still need Xcode to archive applications.
Let me know why you prefer AppCode over Xcode or vice versa.