Hi, Habr!
We have great news for you - in the new version of our IDE for developers for iOS / OS X - AppCode 3.1 - there was a long-awaited support for the Swift language, and even Rename refactoring for code in this language.

Swift
This summer, we all greeted the news about the release of a new programming language with enthusiasm and hopes. And the language also seemed very familiar to us (
http://kotlinlang.org ). To our great joy, Maxim Medvedev joined the team specifically to support the Swift language (we interviewed him not so long ago on our
blog ), who has a lot of experience supporting the Groovy language, in which there are quite a few common ideas with the Swift language. And in the summer we managed to release the first AppCode update, which supported the creation of Swift-files and highlighting the code in them. Now we are ready to please you with “smart” features that you are so used to in the IDE from JetBrains.
')
Regardless of whether you created an entire Swift project or just opened a Swift file in an Objective-C project, AppCode 3.1 helps you be more efficient with:
- Auto-formatting code for the Swift language
We all prefer different styles of writing code and formatting it. Customize the style convenient for you, in Preferences | Editor | Code Style. Spaces, line breaks, shifts - all this and many others can be changed for each supported programming language independently, and the built-in preview will immediately show your changes:

The code is formatted automatically when writing, but you can also call the function manually using the Reformat Code option ( Alt+Cmd+L
).
- Highlight syntax and color scheme editor for the Swift language
Correctly highlighted code is always easier to read and maintain. Therefore, we always pay special attention to code highlighting. AppCode allows you to use both predefined color schemes (taken from AppCode or imported from Xcode), and also create your own. Color schemes, as well as formatting settings, can be changed for each programming language separately:

- Autocompletions for type names, methods, and variables
AppCode 3.1 helps you write Swift code faster using the auto-add feature. It works for names of types, classes, variables and methods (unfortunately, in some cases there are significant limitations , but we plan to fix them in the next 3.1.x updates).
- Large selection of navigation features
Code navigation is as important as the ability to quickly write code. AppCode includes many navigation features, and version 3.1 gives you access to these features in Swift code. Using the menu or the familiar keyboard shortcuts you can:
- go to class by name
- go to file by its name
- go to symbol by name
- go to method declaration / definition
- Use file structure for navigation:

- Highlighting all uses of a character within the current file or finding all uses of the current character in a project
Put the cursor on the character you are interested in, and the AppCode will highlight all its uses in the current file. If you want to find all symbol uses in the whole project, Find Usages ( Alt+F7
) will collect them for you in a separate window, where you can then rearrange the use in a more convenient form (for example, according to the directories where the corresponding files are located).

- Rename refactoring to safely rename a symbol in a project
If you need to change the name of a variable, constant, function, type or class in your Swift code, use Rename refactoring. In this case, you can be sure that all uses of this symbol will also be renamed:

- Swift unit test support
For any developer, tests are just as important as the code itself. Therefore, in version 3.1, there was support for unit testing on Swift. Tests written using the XCTest framework can be run one at a time or all together, study the statistics on past and fallen tests, restart all dropped tests and navigate to the source code of the test from a special launch information window:

In AppCode 3.1, we supported rezolv of Swift classes in code on Objective-C, which guarantees the operation of navigation functions, find usages and other features for Swift symbols used in Objective-C. In future updates, we plan to support the reverse rezolv - Objective-C characters in Swift code.
Of course, we still have many tasks and plans for supporting the Swift language in the AppCode. The whole task tree can be seen in our
tracker . We plan to refine the ready-made features and add new ones in the next 3.1.x updates.
And not only
In addition to Swift support, we added a few more “tasty” and useful features to version 3.1:
- Inline Variable View
To make the debugging process more efficient, AppCode 3.1 helps to see the current values of variables right in the editor window during debugging, opposite their declaration. The option is enabled by default, you can disable it in the debug window. Settings menu | Show Values in Editor.

- Symbolic breakpoint
The ability to put a stop point on a symbol can be very useful if, for example, you want to stop the process of debugging on a symbol from an iOS framework. To facilitate the installation process, AppCode allows you to use autocompletion when specifying the symbol name:

- A smart backspace key that removes characters according to the style used in the project and the formatting settings.
- Improved support for version control systems, and more .
Download the 30-day free version of AppCode 3.1 from our
website . Upgrading to version 3.1 is free for anyone with a valid license. We will be happy to answer your questions in the comments. Remarks and suggestions for the new version are also waiting for us in our
bug tracker .