Advanced Coding Assistance
AppCode offers two kinds of code completion: basic as-you-type completion, and more advanced SmartType completion for more precise filtering of suggestions. Both completion types support CamelHumps and Middle Matching; that is, you can complete any item by entering only its uppercase characters or any part of its name at all.
All completion results are ranged and ordered by relevance considering the caret position and surrounding code. If you are completing something that isn't imported yet, AppCode can even add the import automatically for you.
Automatic Import and Imports Optimization
When you start using a class that is not yet imported, AppCode will suggest adding the corresponding import automatically, or even add the import when you complete code.
With a number of code changes, some imports may become unused; these will be highlighted in the editor. To easily clean up your code, use Optimize Imports action that will remove unused, excessive and duplicating imports in your project.
If you are ever unsure what exact parameters to pass to a method or function, Parameter Info (Ctrl+P) is there to help. It shows you parameter types and available function signatures.
With AppCode you can see a method's implementation without navigating to it or leaving your current context. Simply place the caret on the method call and press Alt+Space.
To see the relevant documentation, just press F1. The documentation displays in a pop-up window with clickable links to other resources. As a bonus, quick documentation can even show you macro substitution or Swift inferred type.
Code formatting works as you type, and can also be invoked implicitly on a selected code fragment, file, or whole directory. You can adjust all code formatting options to comply with your preferred code style or established guidelines.
To keep specific formatting in some selected files, AppCode provides you with an option for keeping proper coding style by auto-detect and use existing file indents for editing. While opening a file with a different coding style in AppCode, you?ll be able to retain indent sizes and other style settings and use these values for this particular file while reformatting your code. To switch it On or Off, go to Preferences | Editor | Code Style (it’s On by default).
AppCode allows you to quickly change the order of code elements with a few simple shortcuts. In particular, you can move up or down blocks of code with Cmd+Shift+Up/Down or lines with Alt+Shift+Up/Down.
To instantly comment or uncomment any block of code, select it in the editor and press Cmd+/ (for line comment) or Alt+Cmd+/ (for block comments). For a line comment, you don't even need to have the line selected.
Expand/Shrink Code Selection
AppCode has a simple shortcut to easily expand selection: from a symbol to an expression, from an expression to a line, from a line to a logical block of code, and so on. Just press Alt+Up as many times as you need, and if you need to shrink the selection to a smaller logical part, press Alt+Down.
Multiple carets and selection
With AppCode you can increase your productivity by editing several locations in your file at the same time. Press Alt+Shift and select the caret locations with the mouse, or press Ctrl+G to add the next occurrence of the current word to the selection (to delete from the selection, press Ctrl+Shift+G). Then, just write code simultaneously in all these positions. Autocompletion and live templates will also work as usual. To restore single caret mode, use Esc.
Code Generation and Refactorings
Create from Usage
With AppCode you can easily practice intentional programming. If you call a method or use a variable that doesn't exist yet, AppCode will suggest a quick-fix to create its definition for you. You will see a light bulb in the left-hand editor gutter with the suggestion, or you can just press Alt+Enter.
Multiple intention actions are there to improve your code, or make routine coding tasks easier. Create symbols from usage, declare methods, swap parts of a boolean expression, merge nested 'if's, generate switch cases, and so on. When there is an intention action that can help you improve your code, you'll see a light bulb in the left-hand editor gutter. In addition, you can always call up the available intention actions with Alt+Enter.
Two simple shortcuts help you cut down on the routine when implementing or overriding methods: Ctrl+I to implement methods, and Ctrl+O to override methods. No need to remember the names of methods to override just press Ctrl+O. You can also choose to implement optional protocol methods.
Many code constructs can be easily generated in AppCode using the Cmd+N shortcut (or Code | Generate in the main menu). Based on the current context, caret position, or selected code, AppCode will give you a list of choices of constructs to be generated. You can opt to create initWith and objectWith methods, declare and synthesize properties, declare members in header file, generate unit tests cases, and so on.
Moreover, if you invoke Cmd+N from Project View, AppCode suggests a different set of options: you can generate a new class, protocol, category or another file.
Adding new classes, protocols, categories or files from Xcode templates is a snap in AppCode: select File | New... from the main menu, or press Cmd+N. Select an element from the list and enter its name.
Live Templates are advanced code snippets that help you create complex language constructs with a couple of key strokes. As soon as you can create loops, NSLog calls, or even property declarations, AppCode will look for suitable variables in the current context and offer them automatically.
To apply a live template, simply type its abbreviation and press Tab. After that, use Enter or Tab to navigate through template variables. Moreover, you can create your own live templates for frequently used code patterns in your project.
'Surround With' Templates
Whenever you need to wrap a block of code in an if, for, @try/@catch, while, (expr), or ((Type)expr) statement, use 'Surround With' templates. Just select the code and press Alt+Cmd+T.
AppCode will add the surrounding construct, intelligently reformat the code, adjust the selection, and/or reposition the caret as specified by the template.
As with Live Templates, you can always create your own Surround With templates.
To help you easily improve code design as it evolves over time, AppCode provides a solid set of reliable code refactorings. These include vital ones like Rename, Extract Method, Introduce Variable and Inline, as well as more powerful ones, e.g. Extract Block Parameter/Protocol/Category/Superclass, Change Signature, Convert Method to Function and back, Pull Members Up/Push Members Down, and others.
AppCode constantly keeps a watchful eye on the quality of your code. No need to run additional tools: all errors and warnings are shown right in the editor, and for most of them, the IDE has a quick-fix suggestion. To go over the errors in a file, navigate from one highlighted line to another by pressing F2/Shift+F2. You can also run all code analysis in bulk mode and apply quick-fixes to a batch of problems with one click, for example to convert a project to ARC.
Code Inspections and Quick-Fixes
AppCode provides over 60 code inspections just for Objective-C, C and C++, and a number of code inspections for other supported languages. All code inspections are run on the fly.
On the right side of the editor you can see the analysis status of the whole file. The icon in the top-hand right corner changes its color when a problem is detected. In addition to compiling errors, different code inefficiencies are identified as well. Whenever there's unreachable code, unused code, non-localized string, unresolved method, memory leaks or even spelling problems, you'll see it right away.
Integrated Clang Analyzer
AppCode comes with an integrated Clang Analyzer and can show you more than 2000 code inspections and error diagnostics results from Clang compiler right in the editor. Alternatively, you can review them in bulk mode using Code | Inspect Code.
Project and Code Navigation
Project View, Structure View, Hierarchy View
AppCode gives you several views to help navigate through your project and see its whole structure. The Project view provides a convenient way of exploring your project structure, while the Files view helps you see the physical project layout rather than logical groups.
There is also a Structure view which displays the structure of a file in the current editor tab, and a Hierarchy view to see classes hierarchy as well as method, call and include hierarchy.
Go to Class/File/Symbol lets you quickly jump to the required place in code when you know what you need. Want to get from a method call to declaration or vice versa? Look no further than Go to declaration/definition (Cmd+B).
Navigation to Implementation, Declaration, Definition
AppCode lets you easily navigate to the definition or declaration of a method, class, or variable by means of special icons in the left gutter area or shortcuts. It always gets to the exact place of declaration. Plus use Alt+Cmd+B to jump around the whole class cluster with its protocols, categories, superclasses and inheritors, be it Objective-C code or C++ templates.
Hover the mouse over a warning, error strip or just a section on the scroll bar, and AppCode will show you the source code fragment annotated with the warning or error message.
If you have a general idea of what you're looking for, you can locate the corresponding element using one of the existing navigation features such as Navigate to Class/File/Symbol, Find Action, etc. But what if you really want to look for something in every nook and cranny? The answer is to use Search Everywhere! To try it, click the magnifying glass in the upper right-hand corner of the window, or invoke it with Double-Shift (press Shift twice).
Related Files, Recent Files & Last Edit
Often enough you need to easily navigate to a file that was edited recently, or a file related to the one that's open right now. With AppCode it's a matter of a few simple shortcuts: Cmd+E for Recent Files, Shift+Cmd+E for Recently Changed Files, Shift+Alt+C for Recent Changes, and Shift+Cmd+Backspace for Last Edit Location.
Find Usages, Highlight Usages
Find Usages lets you quickly see all the places where a symbol (class, method, property, variable, etc.) is used. Place the caret on a symbol and press Alt+F7 to find its usages. Unlike textual search, Find Usages in AppCode works on the semantic level and shows you actual usages, not just text matches. Moreover, it understands, and can be used with, localization, Core Data and xib files.
You can also highlight any reference usages in the current file by pressing Shift+Cmd+F7, and then jump between them.
Place bookmarks on any line of code so you can later navigate between them. All your bookmarks can also be reviewed in a dedicated Favorites view.
TODOs are an easy way to make a 'note to self' right in the code. Just add a comment that contains the "todo" keyword, and AppCode will recognize that comment as a TODO list item, which you can later find in the TODO view.
Target Management and Project Settings
The Project Settings page (Cmd+;) in AppCode allows you to add targets, provide project information like organization and class prefix, and configure frameworks, sources and resources with a simple drag-and-drop action.
Are you developing a multilingual app? Then AppCode can surely simplify your life. The IDE allows you to easily extract inline strings into resources using the "Localize the string" quick-fix. You can also navigate to resource files quickly, plus use all the smart features like refactorings, usages search and other features in localization files.
All the unused keys are highlighted right in the editor, and you can also find all non-localized strings throughout the project with Code | Inspect Code.
AppCode uses LLDB paired with the Xcode you select in the IDE settings and provides many useful features and UI views.
Frames, Watches, Breakpoints, Expression Evaluation
Once you stop on a breakpoint, or pause the debug session, you can see descriptions of all the available variables and even the contents of collections and dictionaries. AppCode provides Frames and Watches to help you investigate any problem with ease. You can also evaluate any arbitrary expression or code fragment: see the results in a structural representation and dig into it right in the results view.
Inline Variables View
Inline Variables View shows you variable values right in the editor (next to variable declaration):
Inline Variables View is enabled by default, but can be easily switched off in Debug tool window Settings menu | Show Values in Editor.
Conditional and Symbolic Breakpoints
With the help of conditional breakpoints in AppCode, you can have more control over the debugging process, and an option to log an evaluated message when a breakpoint is hit.
AppCode supports symbolic breakpoints that can help you stop program execution when a specific function or method starts executing, which is especially important when you need, for example, to stop in some iOS framework. Completion for the symbol's name will assist you to select the appropriate place:
Code Data Objects
AppCode provides a convenient way to browse Core Data objects and their relationships in the debugger.
Out of the box, AppCode supports OCUnit, XCTest, Google Test and Kiwi testing frameworks. Get the best of test-driven development with an easy-to-use and fluent unit test runner. It doesn't require any additional configuration, and allows you to run a single test or all tests in one go.
Code generation in tests
Use the Code Generation action (Cmd+N) to get unit tests’ methods, setUp/tearDown methods for OCUnit, XCTest or Google Test, and standard blocks for Kiwi (it, context, beforeEach, afterEach and specify). For Kiwi, an additional kiwi live template is also available to create Spec.
In AppCode you can have several test run configurations that you can execute from a special popup. Alternatively, you can run a test right from the editor: depending on the context you are in, AppCode will run a single test, or all tests in a scope. The test runner will show you the results in a dedicated view, where you can explore them, navigate to the problems, and see the statistics.
Navigation Between Tests and Classes
Right in the editor you can easily jump between tests and classes using a simple shortcut (Cmd+Shift+T).
AppCode completely supports all the latest iOS features.
Run/Debug on Device
Running and debugging are part and parcel of the development process, and AppCode allows running and debugging your apps directly on a connected iOS device. When you have no real iOS device connected, or need to try a specific configuration, no worries AppCode can run your code in Simulator.
Running Tests and Instruments on Device
With AppCode you can run tests and Instruments to profile your application right on an iOS device.
AppCode provides the easiest imaginable way to switch from Simulator to running on a device and vice versa. Just select the required mode from the Run/Debug popup, invoked with Ctrl+Alt+R/Ctrl+Alt+D.
VCS Integration and Local History
AppCode includes complete first-class integration with the most popular Version Control Systems. This includes both support of features specific for each VCS and a unified interface and management for common VCS tasks.
Subversion, Git, GitHub, Mercurial, CVS, Perforce, and TFS and are all supported out of the box.
All the tedious tasks are performed automatically. A built-in visual merge tool resolves all conflicts in a quick and intuitive manner. The changes made locally are highlighted as you type in the editor gutter, providing intuitive navigation and rollback for individual changes.
While working on several things at a time it is convenient to group your changes into multiple change lists for better organization. That’s where integrated changelists come in handy: they let you organize your changes the way you prefer.
Shelved Changes are a convenient way to set aside certain to restore them later.
Repository Changes View, Incoming Changes View
If you’re using Subversion, stay up-to-date with your team without leaving your IDE: see what has been committed to the VCS by other team members, and use the Incoming Changes view to see the code changes not yet integrated into your local copy.
Outdated Files Notification
AppCode will warn you if you are working with a file that has been changed after your last sync.
Local History helps you get more out of your VCS or, if you don?t use one, it can help you keep track of everything that goes on with your code. With all the constant changes made to the code, version control systems can only track differences between committed versions, while local changes can slip unnoticed. That's when Local History can save the day and prevent the disaster of losing your changes.
AppCode is integrated with Reveal, a fantastic tool from Itty Bitty Apps that helps debug iOS applications. You can experience the benefits of this tool right from AppCode, including the ability to inspect view elements and hierarchies of your iOS apps in real time, use the 2D and 3D visualization possibilities, and edit the view on the fly, which is a convenient way to tweak the interface without recompiling.
To use Reveal from AppCode, first you need to edit the configuration. There is a special tab for this purpose where you can choose to inject a Reveal library on application launch and load the library on the device (or not):
Then, Run/Debug your application and click Show in Reveal on the Debug panel to inspect the application with Reveal.
AppCode officially supports Xcode 6.4 on OS X 10.10. On OS X 10.9, please use Xcode 6.2.
You can open existing Xcode projects and work on a project in both IDEs in parallel. No additional configuration is needed, and your projects always stay 100% Xcode-compatible. AppCode can also create new Xcode projects, and you can add new files to a project in AppCode based on Xcode file templates.
Our own build settings editor allows you to configure your project without leaving AppCode.
AppCode comes with support for the popular Objective-C library manager CocoaPods, providing code completion and intention actions in pod files, as well as automatic installation and update of pods.
External Documentation Browsers (Dash, Ingredients)
If you prefer to use external documentation browsers, AppCode provides a convenient way to do that as it integrates with two popular browsers, Dash and Ingredients.
When your ToDo list is in an issue tracking system, you can configure AppCode to work with the issues without switching away from the IDE. Specify your issue tracker server and you will be able to:
- Select the tasks to work on from the list defined by your filter
- Automatically group VCS changes under the corresponding task
- Commit to VCS with task name/ID pre-filled for you
- Switch between tasks keeping the IDE context saved (open editor tabs, breakpoints, etc.)
AppCode supports Atlassian JIRA, JetBrains YouTrack, Lighthouse, Pivotal Tracker, GitHub, Redmine, and Trac.
RESTful Web Services
If you're doing web development along with creating Cocoa apps, you may benefit from the RESTful web services plugin, which is bundled in AppCode.
Swift code editor
AppCode provides Swift developers with essential coding features like code highlighting, which makes code easier to read; code formatting following a pre-defined or user-specific code style schemes, which describe indents, various spaces, blank lines; and much more. Completion for basic types, methods and variables also works for Swift code, supporting both CamelHumps and Middle Matching.
Navigation options like highlighting all usages, navigation to symbol declaration, go to class/symbol and File Structure view work for Swift code as well. You can also list all usages in a separate window and group them the way you prefer with the Find Usages action.
Use string interpolation to combine strings in Swift and benefit from symbol name highlighting, auto-completion, and Rename:
To support Swift interoperability with Objective-C, AppCode also resolves Swift symbols from Objective-C code and vice versa, providing find usages, navigation and other useful features throughout your whole codebase. Learn which features are supported in each case.
Swift code generation and refactoring
Override/Implement any method of the parent class or implement any protocol in your Swift code and generate a stub with the default code.
Rename Swift variables, constants, functions, type names and classes with Rename refactoring and be sure AppCode updates all the usages across the entire code base for you:
Swift quick documentation
AppCode shows you the relevant documentation for Swift language. Press F1 to bring up a window with clickable links to other resources.
Quick Documentation for Swift can include: standard documentation from Apple DocSets, your own documentation comments, classes, protocols and functions signatures, enums, type aliases, etc., and even inferred type for constants and variables:
AppCode uses LLDB paired with the Xcode you select in the IDE settings. Use AppCode 3.2 debugging features to inspect your Swift application. Inline Variable View works for Swift as well:
Many languages, one IDE
Out of the box AppCode supports Objective-C, Swift, C and C++ languages, as well as web technologies and languages to make your development experience complete.
AppCode natively supports C, and C++, including C++11, libc++ and Boost. Code completion, all navigation features, and most of the coding features like refactorings, find usages and code generation are also available.
All the Emmet features are also supported in AppCode
Customization and Extensibility
Are there any software developers who don’t like to tweak their tools? We have yet to meet one, so we’ve made AppCode UI customization a breeze. Have plenty of screen estate? Turn the toolbars and pin the tool windows to always show. Coding on a 13" MacBook Air? Leave only the editor displayed and show the rest on a need-to-use basis.
If you prefer a dark UI, try the Darcula theme.
UI customizations would be incomplete without being able to configure the editor itself. AppCode comes with several editor color schemes bundled and makes it possible to create your own custom schemes or modifying existing ones. You can also import your preferred color scheme from Xcode.
For higher productivity, AppCode encourages you to use the keyboard for all your tasks.
When you are just getting started with AppCode, try the keyboard hotkeys you already know well. AppCode’s keyboard layout is designed with your convenience in mind, but you can always choose specific layouts such as those from Xcode or IntelliJ IDEA, or just create your own.
AppCode offers a powerful vi/Vim emulation mode giving you the best of both worlds (available via IdeaVim plugin).
A built-in terminal, available via Alt+F12, lets you run commands locally or remotely using the SSH protocol.
IntelliJ Platform, based on over 10 years of development, endows AppCode with 50+ IDE plugins of different nature, including support for additional VCS, integrations with different tools and frameworks, and editor enhancements such as Vim emulation.
AppCode plugins can be browsed and managed from the Plugin Manager in IDE Settings.