Two weeks ago we released AppCode 2017.2 and now it’s time to share our plans for the next release!
We’d like to thank everyone who evaluated AppCode during the Early Access Program and shared their feedback and suggestions in our Twitter, blog and support channel, and especially to those who submitted issues or feature requests to our tracker. Several evaluators deserve free 1-year subscriptions and here they are:
Raphael Reitzig (YouTrack: reitzig.1)
Ralph Bergmann (YouTrack: dasralph)
Fabian Ehrentraud (YouTrack: fabb)
We’ll send each of you guys a personal message with the details on how to claim your license (if you don’t get an email from us within a week, ping us here in the comments).
What to expect in 2017.3
The next release will feature enhancements in the following key areas:
AppCode 2017.2 is here, so download and try it right now! The patch update is also available if you are using a previous 2017.1.3 version (if you’ve already installed AppCode 2017.2 RC2 build, then simply keep using it, since it’s the same as the released one).
We are approaching release, so AppCode 2017.2 RC2 build (172.3317.89) is available for download on our site. Note that build requires an active subscription.
The following issue is fixed in this build:
No ability to extract method with return statement inside closure (OC-15770)
Due to a number of reports about weird behavior of indexing/symbols building progress and sporadic appearance of “Indices are not ready” message we decided to revert the fix for OC-15714. We are targeting to have a better solution for this in future AppCode versions.
We also disabled inspection for unimplemented protocol members (OC-12701) since there were false intentions in some cases (e.g. OC-15380). The inspection will be restored as soon as we resolve related issues.
AppCode 2017.2 Release Candidate build (172.3317.73) is available for download on our site (if using previous 2017.2 EAP build, the patch update is also available). The following issues are fixed in this build:
New AppCode 2017.2 EAP (build 172.3317.17) is available for download on our site (if using previous 2017.2 EAP build, the patch update is also available).
Extract Method for Swift
This build brings one of the most important features from our roadmap, an initial implementation of Extract Method refactoring for Swift! Select the code you want to extract, press ⌥⌘M, and type the method name:
Click on the row with parameter name to change it or add an internal name:
Change the method/function visibility as you want:
Press enter and have your code replaced with the method or function call you have just created:
Note, that some issues still exist and we are working on them.
Besides, this build also brings support for Xcode 9 documentation format, fixes the issue when test output was empty when running UI tests with Xcode 9 set in AppCode preferences, and addresses some regressions found during our testing.
There are a lot of helpful plugins in AppCode plugin repository – such as, for example, the Markdown support. Today we will take a look at three plugins dedicated to Swift development.
SwiftLint is a static analysis tool by Realm that helps you enforce Swift style and conventions in your project. You can use it in AppCode in the same way as in Xcode, by adding the corresponding build phase into your project settings. However, it may be easier to configure it once for all projects. To do that, install the SwiftLint plugin directly from Preferences | Plugins:
Restart AppCode and open Preferences | Tools | SwiftLint. Here you can set the path for the SwiftLint executable (default is /usr/local/bin/swiftlint), select if you want the Autocorrect quick-fix to appear for each SwiftLint warning, or disable SwiftLint if there is no .swiftlint.yml in the root folder of your project:
Finally, you should be able to see SwiftLint diagnostic messages right in your code editor window and be able to invoke swiftlint autocorrect for the current file using the Autocorrect quick-fix:
Swift Mock Generator
This awesome plugin automatically generates mock classes for Swift protocols and has the following features:
Captures invocation status of a method.
Captures invoked method parameters.
Stubs values for your mocks to return.
Automatically calls closure parameters with stubbed values.
Supports mocks conforming to one or many protocols.
Handles overloaded method declarations.
Regenerates your mock in one action.
Supports associated types.
Respects public mocks and makes queries publicly available.
Swiftify is a paid tool that aims to be a full-featured Objective-C to Swift converter. Now you can configure and use it directly in AppCode by installing the plugin by the Swiftify team. Enter your API key in Preferences | Tools | Swiftify:
Check the Tools | Swiftify menu and convert some code:
That’s it! Of course, you can set the shortcut for each Swiftify action in Preferences | Keymap:
Using any other useful plugins with AppCode? Tell us about them in the comments section below, and we’ll include it in the next blog post about plugins.