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
- Run pod install with --repo-update so the latest specs are available.
- Loosen or align the conflicting version constraints in the Podfile.
shell
pod install --repo-updatePin 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
CocoaPods "sandbox is not in sync with the Podfile.lock" in CIFix the CocoaPods "sandbox is not in sync with the Podfile.lock" error in CI by running pod install so the co…
React Native "CocoaPods could not find compatible versions" in CIFix the React Native CocoaPods "could not find compatible versions" error in CI by reinstalling node_modules…
Flutter "Podfile out of date" in CIFix the Flutter "Warning: Podfile out of date" / pod install failure in CI by deleting the stale Podfile and…