CocoaPods could not find compatible versions for pod Firebase/CoreOnly
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.
Introduction
The CocoaPods error about not finding compatible versions for Firebase/CoreOnly usually means your dependency graph is asking for incompatible Firebase versions at the same time. Firebase/CoreOnly is often pulled in indirectly, so the real fix is to align pod versions and update the local specs source rather than trying random Podfile edits.
Why Firebase/CoreOnly Appears in the Error
You often do not add Firebase/CoreOnly directly. Other Firebase pods depend on it internally. When CocoaPods prints an error mentioning it, that usually means:
- one pod requires one Firebase version range
- another pod or plugin requires a different range
- CocoaPods cannot choose a single version that satisfies both
A typical example is mixing an older plugin with newer Firebase pods in the same project. The error message names the internal pod because that is where the version ranges collide.
Start by Updating the Specs and Inspecting the Podfile
First, make sure your local podspec repo is up to date:
Or in one step:
Then inspect the Podfile for version mismatches. A cleaner Podfile usually looks like this:
When possible, let related Firebase pods resolve together instead of pinning mismatched versions manually. Also check the iOS deployment target, because some Firebase releases require a higher minimum platform than older projects declare.
Align Plugin and Pod Versions
If your project uses wrappers such as Flutter, React Native, or a third-party SDK, the conflict may not be in your visible Podfile at all. The wrapper can pin a Firebase version range underneath.
In that case, the real fix is often:
- upgrade the wrapper package so it supports newer Firebase pods
- or downgrade your direct Firebase version pins to the compatible range
What you should avoid is forcing one pod to an arbitrary version without checking the dependency tree. That can move the error instead of solving it.
Reset Pod State If the Lockfile Is Stale
If the Podfile is already aligned but CocoaPods still insists on an impossible version, clear stale resolution state:
This forces CocoaPods to resolve dependencies again from scratch. It is not the first fix to try, but it is reasonable when the lockfile preserves an older incompatible graph. In shared projects, commit the new lockfile only after the dependency graph resolves intentionally.
Common Pitfalls
The biggest mistake is focusing on Firebase/CoreOnly as if it were the real top-level dependency you chose. It is usually only the conflict surface, not the actual design choice that caused the mismatch.
Another issue is mixing explicit Firebase version pins with third-party packages that already manage Firebase versions. That often creates contradictory constraints.
Developers also sometimes skip pod repo update, which means CocoaPods is trying to solve the graph using stale local metadata.
Finally, avoid editing the Podfile randomly until the error disappears. Read the dependency ranges in the error output and make version alignment intentional.
Summary
- The
Firebase/CoreOnlyerror usually points to conflicting Firebase version requirements. - Update CocoaPods specs first with
pod install --repo-update. - Align your direct Firebase pods and any wrapper package versions.
- Remove stale
Podfile.lockandPods/only when a fresh resolution is needed. - Treat
Firebase/CoreOnlyas a symptom of version mismatch, not usually the root dependency choice.
Related reading
- Cocoapods Failed to connect to GitHub to update the CocoaPods/Specs specs repo
- CocoaPods not installed or not in valid state
- Cocoapods setup stuck on pod setup command on terminal
- Cocoapods setup stuck on pod setup command on terminal
- Cocoapods staying on analyzing dependencies
- Cocoapods Warning - CocoaPods did not set the base configuration of your project because because your project already has a custom config set
- Codable class does not conform to protocol Decodable
- Code formatting shortcuts in Android Studio for Operation Systems
.png&w=3840&q=75)
Tackling System Design Interview Problems
A short course that equips you with the skills to approach system design interviews methodically.
Start the free courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.