AppCode or Xcode?
We are often asked if AppCode is a replacement to Xcode. Let's try to answer the possible questions considering different aspects of iOS and Mac OS applications development.
Here is the story in plain text. If you want short answers to particular questions, check out the FAQ below.
AppCode is based on IntelliJ platform that is being developed during 10+ years now and contains a great amount of work and experience about working with code, with big code bases, about debugging code, about working with version controls, etc. And we, first of all, want to bring this knowledge and experience to Objective-C developers. Our goal is not to create an "Xcode killer", we want to help developers do their coding easier, faster and with more pleasure.
Therefore, AppCode relies on Xcode and related dev. tools in the following:
- Project Structure. AppCode opens existing Xcode projects and new projects created in AppCode are created in Xcode project format.
This allows you to switch between AppCode and Xcode without thinking about consequences. Just use what does your current task better.
- File Templates. AppCode provides some own file templates and includes all standard Xcode templates so you can add new files without leaving AppCode.
- Interface Builder. We think Apple's Interface Builder for iOS does a decent job. So, right now we are not going to create our own, but we integrate with it transparently. Just open an .xib file in AppCode and we'll open it in the Interface Builder (or in Xcode 4). Close it when done and go on coding.
- Core Data model files (xcdatamodel) is another file type where Xcode is used for editing.
Q: Do I need Xcode at all?
A: Yes, Xcode is absolutely necessary. AppCode will not run without Xcode available.
Q: What about Interface Builder, Storyboarding, Core Data, etc. Just use Xcode for those?
A: Yes, these tools do their job and AppCode integrates with them, e.g. .xib files are automatically opened in Interface Builder (or in Xcode 4), etc.
Q: Can I use AppCode while Xcode is open with the same project?
A: Yes, AppCode will detect changes in your Xcode project and reload them automatically. Moreover, the changes made in AppCode will be detected in Xcode and it will offer to reload them too.
Q: Does AppCode work with Xcode 3 as well as with Xcode 4?
A: Both Xcode versions are supported.
Q: Why Mac OS X only?
A: You've probably guessed it. AppCode needs Xcode. And Xcode only runs on... right, Mac OS X.
Q: Does AppCode support the workspaces configured in Xcode?
A: Yes, workspaces are fully supported.
AppCode Basics: First Start
When you get into a new car you, normally, do something before you start the engine. Right?
You adjust the mirrors and seats; you check where the most important switches are and how they work. Let's quickly do the same about getting into AppCode.
On the Welcome screen you can start a new or open an existing Xcode project. All Xcode project templates are available inside the New Project wizard. To open an existing project just locate its
.xcodeproj file on the disc or checkout the project from a version control system if it is not on your disc.
|There are no images attached to this page.|
Here are some of the concepts of AppCode UI one may want to know:
1 — Code editors with tabs
2 — Tool-window: specialized secondary windows that are attached to the bottom and sides of the workspace and provide access to typical tasks such as project management, source code search and navigation, running and debugging, integration with version control systems, etc.
3 — Tool-window buttons: buttons that show/hide tool-windows. Numbers near window names indicate keyboard accessors, e.g. Project tool window can be accessed with Cmd-1.
4 — Project view tool-window: a tool-window that's open by default.
5 — Navigation Bar
6 — Run/Debug Toolbar
These are the key UI elements you'll notice once your project is open.
AppCode is a complex and highly customizable development environment. You can quickly change the IDE look using the options under View menu or dive into IDE Settings dialog where you can configure IDE and Project settings.
AppCode allows customizing virtually anything. Walk through the Settings sections to know what you can change. A search field is available to help you find a needed configuration option quickly.
|There are no images attached to this page.|
One of the important concepts of AppCode and all JetBrains products is a higher productivity via extensive keyboard use. You can do everything from the keyboard inside the IDE and you can customize the keyboard hotkeys as well. AppCode comes with a number of different keymap schemes bundled: "Default", "IntelliJ IDEA", "Xcode", "Visual Studio", "ReSharper", "ReSharper OSX" and "Emacs". Pick the one you're used to and feel comfortable with.
To memorize AppCode shortcuts faster, open the keymap reference using Help | Default Keymap Reference and print it.
AppCode is also an extensible IDE. There is a number of useful plugins available. You can find them in IDE Settings | Plugins section. Review the installed plugins and those available in the repository. Note that you can disable some plugins you don't need them, e.g. you never use CVS --- you can turn it off.
AppCode Basics: Code Navigation
Efficient project code navigation is critical, and not only when you try to research someone's code but for your own one, when a project gets bigger. Effective ways to explore and navigate code is one of key areas we focus on in creating the AppCode IDE. However, since no two projects are alike, and each developer has their own habits and practices, we have designed different sets of navigation commands to suit both keyboard addicts and mouse maniacs. Choose what's right for you, but consider checking the other options, too.
Generally, code navigation in AppCode can be divided into 3 major kinds:
- from a usage to declaration
- from a declaration to usages
- through classes hierarchy
But let's review them all with examples.
When working on your own project, you often know which file or class you want to open and edit. The fastest way to do this is to use Go to Class... (Cmd+O) or Go to File... (Cmd+Shift+O).
If you know precisely, that you want to get to a definition of
MyFavoriteVariable, use Go to Symbol (Cmd+Shift+O)
Quickly navigate through class hierarchy using the gutter navigation icons:
- Go to implementation or super-class
- Switch between implementation and declaration
- Go to related files/classes
- Go to super method in interface/protocol
Other options include:
- Go to symbol
- Go to declaration
- Go to line
- Go to next/previous method, etc.
Just open the "Go To" menu and you'll see the whole list with their keyboard shortcuts. These are the options that are worth trying and remembering and that you'll need daily, if not hourly.
In addition to just navigating the code tree AppCode offers advanced code view and search options.
The specific views include:
- Project View — main project and project files browser
- Structure View — displays the structure of a file in the current editor tab
- Hierarchy View — allows to see subtypes/supertypes/classes hierarchy
All three views are shown on the below screenshot and allow to quickly navigate to the corresponding source code.
Additionally, there are "Quick Lookup" options:
- Quick Definition Lookup — allows to see the definition of class/function/symbol without loosing the context (see screenshot above)
- Quick Documentation Lookup — shows documentation for an object under the caret (from Xcode)
And finally, the last in this section but probably one of the utmost importance — Usage Search.
Thanks to AppCode's ultimate knowledge of your project code you can easily find out where some object is being used, be it a class, a function, a variable or a resource such as image file.
Just put a caret on a symbol in the editor or select a file in project view and hit Alt+F7, select where to search and see the results in a special view broken down into categories such as Variable declaration, Usage in Import, etc. Of course, you can instantly get to any found line of code from here.
Alternatively hit Cmd+Alt+F7 and see the same results instantly in a popup window.
Pick a place you want to jump to and hit Enter to open it in the editor.
AppCode Basics: coding, code generation, intentions
AppCode Basics: code analysis, quick-fixes, refactoring
AppCode Basics: unit testing with OCUnit
AppCode Basics: debugger
AppCode Basics: VCS