Skip to content

spm_update

Update all Swift Package Manager dependencies in your project to the latest versions that satisfy the version requirements defined in your Package.swift or Xcode project settings. This modifies Package.resolved with the new version pins. Use this to pick up bug fixes, security patches, and new features from your dependencies.

ParameterTypeRequiredDefaultDescription
projectPathstringNoAbsolute path to the .xcodeproj, .xcworkspace, or directory containing Package.swift. If omitted, uses the current working directory.

“Update all Swift packages to their latest compatible versions”

{
"projectPath": "/Users/johndoe/Projects/MyApp/MyApp.xcodeproj"
}

“Update dependencies for my Swift package”

{
"projectPath": "/Users/johndoe/Projects/MyLibrary"
}

“Update all SPM dependencies in my workspace”

{
"projectPath": "/Users/johndoe/Projects/MyApp/MyApp.xcworkspace"
}
Updating Swift Package Manager dependencies...
Project: /Users/johndoe/Projects/MyApp/MyApp.xcodeproj
Updating https://github.com/Alamofire/Alamofire.git
Updating https://github.com/SnapKit/SnapKit.git
Updating https://github.com/onevcat/Kingfisher.git
Updating https://github.com/apple/swift-collections.git
Updated packages:
Alamofire: 5.9.0 -> 5.9.1
Kingfisher: 8.0.3 -> 8.1.0
Unchanged packages:
SnapKit: 5.7.1 (already up to date)
swift-collections: 1.1.4 (already up to date)
Package.resolved has been updated.
  • spm_resolve — Resolve packages to the exact pinned versions without updating
  • spm_show_dependencies — View the dependency tree after updating
  • build_app — Build the project to verify compatibility after updating