Three AppCode plugins for 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.
Read the full overview of its functionality here.
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:
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.
Your AppCode team
The Drive to Develop
Subscribe to Blog updates
Thanks, we've got you!
Writing Code Documentation in AppCode
Code documentation can save you a lot of time and headaches. On the other hand, it also takes a lot of effort to write and maintain it. In this article, we will look at the AppCode features that can help you create detailed and well-structured code documentation and keep it updated after code refact…
Polish Your Code with AppCode’s Inspections and Intentions
AppCode is constantly analyzing your code to find parts that can be improved. It provides sets of code inspections and intention actions for each supported language for this exact purpose. Inspections locate unused or redundant code, syntax errors, probable bugs, spelling mistakes, obsolete or redun…
Navigation in AppCode
Navigating through files and source code, especially in complex projects, can eat up a lot of time, which is why it is essential to learn how to move around quickly in your IDE. AppCode provides plenty of navigation features that can help you move faster. In this blog post, we’ll take a look at some…
Server-side Swift in AppCode
In this short article we’ll take a look at various AppCode features that are useful for server-side Swift development, as now you can open standalone SPM projects in AppCode on macOS. Check out and open the project On the Welcome screen, click the Get from VCS button and enter the address of the Fe…