Learn all about Swift Package Manager with these posts

The Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

New!
Building a Swift package using the Swift 6 language mode

How to download and install a development version of the Swift 6 compiler and enable the Swift 6 language mode when building your Swift package.

Multi-platform Swift Package releases with GitHub Actions

How to automatically create and release a multi-platform Swift Package library with GitHub Actions whenever you push a new tag.

How to generate Swift interfaces from Pkl configuration files using SPM plugins

Pkl (pronounced Pickle) is a new programming language from Apple designed specifically for configuration. It allows developers to design data models richly and expressively through the use of types and then validate them to catch errors early on. A feature that sets it apart for Apple developers and, as it couldn't be any other way with Pkl being an Apple language, is that it has a suite of tools available for generating Swift interfaces from `.pkl` configuration files.

Enable upcoming Swift features

How to effectively adopt upcoming Swift 6 features in your Swift Packages and Xcode targets today.

Using Swift SDKs to cross-compile Swift packages to Linux

Learn about Swift SDKs and how you can use them to cross-compile Swift code to other platforms such as Linux.

Adding an Info.plist file to a Swift executable

Find out how to add extra information to your Swift command-line tool through an Info.plist file while keeping it as a single-file executable.

Load custom fonts into your app using Swift Package Plugins

How to make use of Swift Packages, plugins and code generation to automate the process of loading custom fonts into your app.

Version-specific Package.swift files

How, why and when to define version-specific manifests for your Swift Packages.

Automating Swift command line tool releases with GitHub Actions

How I use GitHub Actions to automate the release of my Swift command line tools.

Coming in Swift 5.9: Network requests in Swift package plugins

A deep dive into a new feature coming to Swift Package Manager in Swift 5.9: the ability to make network requests from Swift package plugins.

Safely pinning SPM dependencies to exact versions

I will show you how code might change across different builds even when depending on an exact version of a Swift Package as well as how to mitigate the risks associated with this.

Platform specific code in Swift Packages

A set of examples showing how useful compiler directives can become when building cross-platform Swift programs.