Swift Project Management#

Noctule supports Swift Project Manager projects.

Creating a New SwiftPM Project#

To create a new Swift PM project, open the wizard with File → New Project… → Swift Package. Under the hood, Noctule executes swift package init to create the new project. The wizard provides a user interface to configure the settings passed to this command.

Options#

Name
The name of the project. It’s used by the IDE and is also serves as the default value for the package name input.
Location
The parent directory for the new project directory.
Swift Toolchain
Defines the default Swift toolchain for the new project. It is also used to execute the swift command to create the new project.
Swift SDK
Defines the default SDK for the new project. By default, no SDK is configured to use Swift’s defaults.
Package Type
The type of package to create. It’s passed as the value for --type of swift package init.
Package Name
The name of the package. If defined, it’s passed as the value for --name of swift package init.
Enable support for Swift Testing
Whether to enable support for Swift Tests. If enabled, --enable-swift-testing is passed to swift package init. Otherwise, --disable-swift-testing is passed. This option is grayed out if the selected Swift toolchain does not support it.
Enable support for XCTest
Whether to enable support for XCTest. If enabled, --enable-xctest is passed to swift package init. Otherwise, --disable-xctest is passed. This option is grayed out if the selected Swift toolchain does not support it.

Opening a SwiftPM Project#

You can simply open the directory containing the Package.swift file in your IDE.

If you would like to work on several Swift projects at the same time, then open the parent directory containing all the projects.

Noctule will detect all Package.swift files inside the directory hierarchy and pass these directories to the Swift langauge server.

To work with a project on Windows WSL, the SourceKit LSP server must be launched on the WSL system. Open the project from the WSL filesystem, e.g. \\wsl.localhost\Ubuntu\projects\my-project. Noctule detects Swift toolchains managed by Swiftly, which are located on the WSL Linux system, and launches the LSP server inside the WSL system.

Opening an Xcode Project#

macOS only

Support for Xcode projects has been available since Noctule 2.0.

Please refer to Xcode support to learn more about the support and how to use it.