AppCode joins Swift club with 3.1 EAP

Most of us have read or at least heard of Gulliver’s Travels by Jonathan Swift. Well, we kind of feel like a Gulliver now, as we take a big step forward and start with Swift support in AppCode!

This summer, soon after the Apple event, we announced basic editing and highlighting for Swift code. Since then we’ve implemented resolve in Swift code and built a couple of useful features on top of that. So, let’s have a look at what’s already available in this EAP.

Start with creating a Swift-based project or just a new Swift file (select New | File from Xcode Template…) in the currently existing project. Now you can write some code, autocompletion for the language keywords will assist you with that.

After implementing the most part of resolve in Swift code, we are able now to provide you with smart features. Find Usages goes first! It helps you quickly find all pieces of code referencing a symbol at the caret, no matter if the symbol is a class, function, variable, constant, or type.

If you simply place a caret on a symbol in your Swift code, AppCode highlights all the usages within the current file and also marks them all in the right gutter:
If you are interested in the full list of usages, press Alt+F7 to have AppCode find all usages for you and collect them in a separate window. You can group the usages there by your preferred criteria, for example by directory:

AppCode is known for its safe, accurate and reliable automated refactorings that allow you to modify and improve your code easily. With 3.1 EAP we bring the most widely used Rename refactoring to Swift code! Rename (Shift+F6) variables, constants, functions, type names and classes and be sure AppCode updates all the usages across the entire code base for you:
Since this is a EAP build external function parameter names (as well as shorthand names) are not resolved and thus are not highlighted as usages or renamed when used outside the function body.

Navigation options help you switch quickly between parts of your code to be more productive. For Swift code, AppCode now supports:

  • Go to Class (Cmd+O):
  • Go to Symbol (Alt+Cmd+O):
  • Navigate to declaration of symbol at caret (Cmd+B).

AppCode provides more navigation options that are language-independent and thus work regardless of the Swift or Objective-C languages used in your project. Check them in Navigate menu or read the detailed descriptions in AppCode web help. By the way, web help is integrated into the IDE. In many dialogs now you can see a Help button that redirects you to the appropriate page in the web help.

Swift was created to be interoperable and compatible with Objective-C, so Swift API can be used in Objective-C and vice versa. In this EAP build, AppCode supports Objective-C-to-Swift resolve, which means that Swift classes can be resolved in Objective-C code. Hence, you can use completion, navigation and find usages functionality in these cases.

There are still a few important limitations in the current Swift functionality:

  • AppCode doesn’t provide you with compile warnings in the editor.
  • Completion is now working only for the keywords.
  • Code formatter for Swift is not ready yet.
  • External parameter names, shorthand names and tuple element names are not resolved correctly yet.
  • While Swift classes are resolved correctly in Objective-C code, usages of methods are not; we plan to improve this in the nearest updates.

We’ll continue to enhance Swift functionality to deliver more goodies for you to use in the following updates.

We are committed to helping developers be more productive in all stages of their development process. Debugging is one of the steps where our IDEs can assist in a smart way. In this EAP we add a new helpful feature: Inline Variables View. It’s intended to show you the 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.

UI changes
When you run this EAP build, you’ll definitely notice how the Preferences dialog has been redesigned. Settings have been rearranged, and the overall structure is clearer and more logical. Project-specific settings and IDE settings are now merged together. To tell if a setting relates to the current project, note the icon to the right of the setting’s name:
We’ve also followed up on one of the top voted users’ requests, and now you can sort files in project view “like in Xcode”. To use it, enable Manual Order in the context menu.

Editor features
This EAP build brings a lot of small editor enhancements that all together provide users with better development experience. First, smarter Backspace key now removes indents and white spaces according to your code style settings:
This is enabled by default but can be easily switched off in Preferences | Editor | General | Smart Keys.

To keep specific formatting in some selected files, we provide you with a new option for keeping proper coding style by auto-detect and use existing file indents for editing. While opening a file with 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. Feel free to switch it On or Off in Preferences | Editor | Code Style (it’s On by default).

Both features are applicable to all languages except Swift for now, since formatter in Swift is not ready yet.

Some other notable changes:

  • Symbolic breakpoints are now available in AppCode.
  • Find in Path improvements: starting with v3.0, AppCode allows you to search through comments and string literals. In 3.1 EAP, you can also search anywhere except any of these or except both.
  • Git integration was updated with the Reset Current Branch to Here action in Git Log.
  • Rollback action is now available for a code selection via Alt+Cmd+Z or left-gutter menu. It will revert the exact selected block but won’t touch other code containing changes.

Some performance enhancements and C++ improvements were also introduced. The full list of fixed issues can be found in our issue tracker. Please note that system requirements have slightly changed: the lowest supported OS X version is 10.9, and the lowest supported Xcode version is 6.1.

You can download the build on our EAP page. Do let us know what you think – take part in discussions on the forum and feel free to file bug reports and suggestions in our issue tracker.

P.S. Continuing our code-naming tradition, these EAP builds will be dubbed Champurrado, which is a warm chocolate-based Mexican drink. Yummy! On the practical side, it’s also the easiest way to find information on specific AppCode versions in our blog: to find posts about v3.1, just search for Champurrado.

Develop with pleasure!
The AppCode Team

This entry was posted in Announcement, Early Access Preview and tagged , . Bookmark the permalink.

21 Responses to AppCode joins Swift club with 3.1 EAP

  1. Bimawa says:

    GO GO JB!!!!!

  2. Bronts says:

    Waoooo~It’s Great!

  3. Laurent says:

    Was so happy when i see this news, but we are unable to make it works with our project.
    AppCode seems unable to compile project with custom operator.

    Is it just me?

  4. John says:

    This is great news. Xcode 6.1 is unusable with Swift. It would be very interesting to know what the plans are for the final 3.1 release. Should we expect code completion etc, or will that be a longer term goal that we shouldn’t expect until 3.2, 3.3… or 4? I appreciate that adding this support is a lot of work and am happy to wait until it’s ready and stable, as opposed to Apple’s strategy of just releasing it, even if it’s Alpha quality. But I’d love an idea of how long you think it might take.

    • Anastasia Kazakova says:

      We hope to finish with resolve before the 3.1 – some cases are still left. Then will probably do the completion. Hopefully we’ll cope before 3.1

  5. Ray Beyer says:


  6. Ray Beyer says:

    Ahhh, yes – finally can also build my actual project. It was a pain not to be able to use the debugger (and I didn’t have the time to check whats wrong). THANKS:-)

  7. bait says:

    When do you plan to finish UI designer features for Swift Controllers?

  8. Bronts says:

    It looks like appcode doesnot support swift file structure.I mean the code outline. I want to know when appcode could show swift file code structure?

  9. David says:

    Refactor rename feature of swift: nice
    Autocompletion of swift: not working
    Support of swift closure syntax { [capture group] parameter in code } failed
    Format rules: nice

    • Anastasia Kazakova says:

      Actually there is no special formatting rules for Swift, we are planning to add them. As well as autocompletion. Closures are also in the improvement list for us.

  10. Siema says:

    uuhhh all is fine, also the font looks better on my Mac in 3.1, but…….

    Where did the option to duplicate class go?????? (shift-f5)

    It was one of the best features :/

  11. Rand E. Gerald says:

    Does AppCode support the latest iterations of Swift (Swift 1.2)?

Leave a Reply

Your email address will not be published. Required fields are marked *