swift-package-manager
Installation
SKILL.md
Swift Package Manager (SPM)
Overview
SPM is Apple's dependency manager. A package is defined by a Package.swift manifest using the PackageDescription API: it declares dependencies, targets (build units), and products (what is exported for others to use).
When to use
- Adding a Swift dependency to an iOS app
- Extracting reusable code into a local Swift package/module
- Configuring
Package.swift - Distributing a KMP
XCFrameworkvia SPM (see kmp-ios-integration)
Package.swift
// swift-tools-version: 6.0 ← must be the very first line
import PackageDescription