Skip to content
Latchkey

CocoaPods "could not find compatible versions for pod" in CI

CocoaPods could not resolve a set of pod versions that satisfy every constraint. Two requirements conflict, or the requested version does not exist in the spec repo CI has.

What this error means

pod install aborts with could not find compatible versions for pod "X", listing the conflicting requirements. It is deterministic for a given Podfile and spec repo state.

xcodebuild
[!] CocoaPods could not find compatible versions for pod "Alamofire":
  In Podfile:
    Alamofire (~> 5.8)
    SomeSDK depends on Alamofire (< 5.0)

Common causes

Conflicting version requirements

Two pods, or your Podfile and a transitive dependency, require incompatible version ranges.

Stale spec repo in CI

A newly published version is not in the runner spec repo, so CocoaPods cannot see a satisfying version.

How to fix it

Update the spec repo and relax constraints

  1. Run pod install with --repo-update so the latest specs are available.
  2. Loosen or align the conflicting version constraints in the Podfile.
shell
pod install --repo-update

Pin a resolvable set in Podfile.lock

Resolve locally, commit Podfile.lock, and have CI install the locked versions so resolution is reproducible.

How to prevent it

  • Commit Podfile.lock and update the spec repo before resolving. On Latchkey managed runners, self-healing auto-retries transient spec-repo fetch failures so a network blip during --repo-update does not fail the job.

Related guides

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