News Tips & Tricks

Swift Package Manager support in CLion

Hi everyone,

Today we are excited to announce that the Swift plugin for the latest CLion 2018.3 EAP build supports Swift Package Manager projects directly! Simply open the SPM project and work with it – no additional configuration required.

Read on to learn about all the available features, or watch the short demo below to see them in action:


Project

Have all project dependencies resolved automatically:
Dependencies
Edit Package.swift with code completion and highlighting available:
Completion
Add dependencies easily with a code completion for project targets:
Target completion
Import changes in one click:
Import
Invoke Swift Package Manager actions right from the context menu or via Tools | Swift Package Manager:
Actions

Code

Code faster using the same code generation and refactoring actions that you have in the latest AppCode EAP:
Generate

Have SourceKit inspections and fix-its displayed right in your code editor:
SourceKit

Run, Debug, Test

Run Configurations are created automatically for all products in your Package.swift:
Run Configurations

To Run or Debug your application or tests, select the corresponding Run Configuration and press ⌃R or ⌃D:
Run and Debug

Linux support

Develop your SPM projects on Linux having almost the same features as on macOS:

Linux support

Please note that LLDB in Swift 4.1.x toolchains does not work correctly on Linux, so we recommend using Swift 4.2 toolchains. In addition, we have an issue when it’s not possible to Run or Debug all tests on Linux.

Future plans

During the 2018.3 EAP cycle, we plan to focus on fixing bugs and implementing such features as first-class unit-testing support, on the same level AppCode already offers for macOS. Other features are linked here as subtasks. After finishing most of these tasks, we plan to add support for Swift Package Manager projects in AppCode.

Here’s hoping CLion will become your IDE of choice for cross-platform Swift development!

Your AppCode Team
JetBrains
The Drive to Develop