When running pod install or pod update, CocoaPods may stop with Could not find compatible versions for pod. This usually means that CocoaPods cannot satisfy all version requirements at the same time. Common causes include conflicting version constraints in the Podfile, an older version locked in Podfile.lock, an insufficient deployment target, or incompatible requirements between dependent pods.
Main causes
- The version specified in the Podfile conflicts with a dependency requirement
- Podfile.lock keeps an older pod version pinned
- The iOS deployment target is lower than the minimum required by the pod
- Local Specs information is outdated
- Two or more pods require different versions of the same dependency
Typical error example:
[!] CocoaPods could not find compatible versions for pod "ExamplePod":
In Podfile:
ExamplePod (~> 2.0)
Specs satisfying the `ExamplePod (~> 2.0)` dependency were found, but they required a higher minimum deployment target.
When this error commonly appears
This error often appears after updating a library, switching Git branches, changing Xcode or the iOS SDK, or when a team shares a Podfile.lock that was generated under different dependency conditions.
How to check the problem
1. Check the CocoaPods version
pod --version
2. Compare Podfile and Podfile.lock
Search for the affected pod name and compare the version requirement in Podfile with the version currently pinned in Podfile.lock.
3. Check the deployment target
Review the platform line in the Podfile and the app target’s Minimum Deployments or Deployment Target setting in Xcode.
platform :ios, '15.0'
Solutions
Solution 1: Update only the affected pod
Start with the smallest possible change by updating only the pod involved in the conflict.
pod update ExamplePod
Solution 2: Refresh Specs and install again
pod repo update
pod install
You can also run:
pod install --repo-update
Solution 3: Review the version constraint in Podfile
If the Podfile pins a version too strictly, adjust the requirement so CocoaPods has a compatible range to resolve.
pod 'ExamplePod', '~> 2.0'
Solution 4: Raise the deployment target
If the log includes required a higher minimum deployment target, increase the app’s minimum iOS version to one supported by the pod.
Solution 5: Regenerate Podfile.lock
If the lock file contains an incompatible dependency set, regenerating it may resolve the conflict.
rm Podfile.lock
pod install --repo-update
Note: Removing Podfile.lock can update multiple dependencies at once. In team projects, review the resulting changes carefully and do not delete the lock file casually.
Solution 6: Rebuild the Pods directory
If generated files or cached pod state are contributing to the issue, rebuild the Pods directory.
rm -rf Pods
pod install --repo-update
How to read the dependency conflict
The error output usually shows which pod requires which dependency and which version range is being requested. Read the dependency chain from the top instead of focusing only on the final line. This often reveals the exact pair of incompatible requirements.
Important caution
Running pod update without a pod name may update many libraries that were previously pinned by Podfile.lock. Prefer pod update PodName first when you want to minimize unrelated changes.
Summary
Could not find compatible versions for pod means CocoaPods cannot construct a dependency set that satisfies every requirement. Check the Podfile, Podfile.lock, deployment target, and Specs data in that order. Updating only the affected pod, adjusting version constraints, refreshing Specs, or increasing the minimum iOS version will resolve most cases.
