Ishu Prabhakar
Ishu Prabhakar

Reputation: 9

Cannot build IOS app due to CocoaPods could not find compatible versions for pod "Firebase/CoreOnly"

When attempting to build the Flutter app on an "Apple MAC M1," I encountered an error. I attempted to resolve it by executing the following command:

#!/usr/bin/env bash

rm -rf Podfile.lock && flutter build ios && arch -x86_64 pod install

The error was related to CocoaPods not finding compatible versions for the pod "Firebase/CoreOnly." Specifically, the versions identified were:

In the Podfile.lock snapshot:

In the Podfile:

Detailed error


      CDN: trunk Relative path: Specs/4/2/c/FlutterMacOS/3.16.0/FlutterMacOS.podspec.json modified during this run! Returning local
      CDN: trunk Relative path: Specs/0/3/5/Firebase/10.27.0/Firebase.podspec.json modified during this run! Returning local
    [!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
      In snapshot (Podfile.lock):
        Firebase/CoreOnly (= 10.20.0)

      In Podfile:
        firebase_core (from `.symlinks/plugins/firebase_core/ios`) was resolved to 3.1.0, which depends on
          Firebase/CoreOnly (= 10.27.0)


    You have either:
     * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
     * changed the constraints of dependency `Firebase/CoreOnly` inside your development pod `firebase_core`.
       You should run `pod update Firebase/CoreOnly` to apply changes you've made.

    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in `raise_error_unless_state'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'
    <internal:kernel>:90:in `tap'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `unwind_for_conflict'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:257:in `process_topmost_state'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/resolver.rb:94:in `resolve'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:1082:in `block in resolve_dependencies'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in `section'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:1080:in `resolve_dependencies'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:125:in `analyze'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:422:in `analyze'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:244:in `block in resolve_dependencies'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in `section'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:243:in `resolve_dependencies'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:162:in `install!'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/command/install.rb:52:in `run'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in `run'
    /Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/bin/pod:55:in `<top (required)>'
    /Users/builder/.rbenv/versions/3.0.4/bin/pod:25:in `load'
    /Users/builder/.rbenv/versions/3.0.4/bin/pod:25:in `<main>'

Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
  pod repo update

Error running pod install

Due to the lack of a macOS machine, I used "Codemagic" for building and publishing the app.

I tried resolving this by browsing several articles on Stack Overflow, but they were somewhat outdated and didn't help me. That's why I'm asking this.

I attempted to update all Firebase packages, but the issue persisted. I also experimented with various Flutter versions like "3.19.0," "3.22.0," "3.22.2," and "3.23.0-0.1-pre," along with different CocoaPods versions like "1.15.2" and "1.15.0," but unfortunately, no solution was found.

Upvotes: 0

Views: 224

Answers (0)

Related Questions