BugMedic

Debug a Swift package dependency that will not resolve

Separate a failed Git fetch from incompatible version requirements and a lockfile mismatch before touching caches.

By BugMedic editorial teamLast source review: 2026-09-27macOS

Separate a failed Git fetch from incompatible version requirements and a lockfile mismatch before touching caches.

Try these fixes in order

01

Read the first error

Note the URL, revision or version, and whether the error is authentication, network, checksum, or version conflict.

02

Verify requirements

Check Package.swift or the Xcode dependency rule and the available tags of that repository. A tag must satisfy the declared range.

03

Check pinned revisions

Inspect Package.resolved and source-control changes. CI should receive the committed file and access to private repositories.

04

Reproduce in package root

For a standalone package, resolve with the selected toolchain; compare the result with Xcode’s package log.

swift package resolve

Interpret what you see

The error names an unavailable revision

What it suggests: The pinned commit or tag may have moved or been removed.

Next check: Compare Package.resolved against the repository history and a valid requirement.

Two packages require incompatible ranges

What it suggests: There is no single version satisfying both constraints.

Next check: Identify the common dependency and update an upstream requirement or choose compatible releases.

Only a private package fails on CI

What it suggests: The build runner cannot fetch it even though local credentials work.

Next check: Configure supported CI credentials for that repository without committing a token.

Why this happens

  • A required version or revision does not exist.
  • The repository is private or unreachable from the build environment.

Still not working?

A cache reset does not create a missing tag or grant access. Fix the first reported failure and resolve again.

Official sources

These steps are based on the linked documentation and general diagnostics. BugMedic has not independently tested every product and system configuration. Review commands before running them.

Related Xcode guides