Skip to content
Latchkey

SwiftPM "toolsVersion ... is not supported" in CI

SwiftPM refuses a manifest whose declared toolsVersion falls outside the range this SwiftPM understands. It appears when a dependency was written for a much newer (or much older) toolchain than the runner has.

What this error means

Resolution or build fails with "the package ... at ... toolsVersion (X) is not supported by the current version of SwiftPM", naming the offending package.

swift
error: the package manifest at 'Package.swift' cannot be accessed (package at '.../SomeDep' @ 1.2.0 has toolsVersion 6.1.0 which is not supported by the current version of SwiftPM)

Common causes

A dependency targets a newer SwiftPM

The pinned version of a dependency declares a toolsVersion past what the runner SwiftPM supports, so it cannot be loaded during resolution.

The runner toolchain is behind the ecosystem

An older Xcode/Swift on the runner cannot interpret manifests that assume a current SwiftPM.

How to fix it

Upgrade the runner toolchain

  1. Identify the toolsVersion the dependency requires.
  2. Select an Xcode/Swift on the runner that provides at least that SwiftPM.
  3. Re-run resolution.
.github/workflows/ci.yml
- run: sudo xcode-select -s /Applications/Xcode_16.1.app
- run: swift package resolve

Pin the dependency to a compatible version

If you cannot upgrade the toolchain, constrain the dependency to a release whose toolsVersion your SwiftPM supports.

Package.swift
.package(url: "https://github.com/acme/SomeDep.git", from: "1.1.0")

How to prevent it

  • Track the SwiftPM version implied by your dependency updates.
  • Keep runner Xcode current for actively maintained dependency graphs.
  • Pin dependencies so a surprise major bump does not raise toolsVersion in CI.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →