DAY #20 🎉🎉

SPM (Part 1 of 3)

Ok, I’ve mentioned SwiftPM or SPM multiple times now - but what is it?

SwiftPM is a built-in dependency manager for Swift code. SwiftPM allows users to create, distribute, download, and link modules. Modules can either be libraries, or executables.

Here is the basic file structure of a module:

1
2
3
4
5
6
ModuleName
├── Sources
│   └── ModuleName
│       ├── File1.swift
│       ├── File2.swift
└── Package.swift

The Package.swift file is the most important part, as it organizes the module.

Originally published 04/22/2021 @ https://pittcsc.org/ Discord

Published here on 09/09/2022. Blog published date reflects the original date of publication.