When trying to construct the Flutter app on an “Apple MAC M1,” I encountered an error. I tried to resolve it by executing the next command:
#!/usr/bin/env bash
rm -rf Podfile.lock && flutter construct ios && arch -x86_64 pod set up
The error was associated to CocoaPods not discovering suitable variations for the pod “Firebase/CoreOnly.” Particularly, the variations recognized have been:
Within the Podfile.lock snapshot:
- Firebase/CoreOnly (= 10.20.0)
Within the Podfile:
- firebase_core (from
.symlinks/plugins/firebase_core/ios
) was resolved to three.1.0, which requires Firebase/CoreOnly (= 10.27.0)
Detailed error
CDN: trunk Relative path: Specs/4/2/c/FlutterMacOS/3.16.0/FlutterMacOS.podspec.json modified throughout this run! Returning native
CDN: trunk Relative path: Specs/0/3/5/Firebase/10.27.0/Firebase.podspec.json modified throughout this run! Returning native
[!] CocoaPods couldn't discover suitable variations 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 three.1.0, which will depend on
Firebase/CoreOnly (= 10.27.0)
You have got both:
* out-of-date supply repos which you'll be able to replace with `pod repo replace` or with `pod set up --repo-update`.
* modified the constraints of dependency `Firebase/CoreOnly` inside your improvement pod `firebase_core`.
It is best to run `pod replace Firebase/CoreOnly` to use adjustments you have made.
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/molinillo-0.8.0/lib/molinillo/decision.rb:317:in `raise_error_unless_state'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/molinillo-0.8.0/lib/molinillo/decision.rb:299:in `block in unwind_for_conflict'
<inner:kernel>:90:in `faucet'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/molinillo-0.8.0/lib/molinillo/decision.rb:297:in `unwind_for_conflict'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/molinillo-0.8.0/lib/molinillo/decision.rb:257:in `process_topmost_state'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/molinillo-0.8.0/lib/molinillo/decision.rb:182:in `resolve'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/resolver.rb:94:in `resolve'
/Customers/builder/.rbenv/variations/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'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in `part'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:1080:in `resolve_dependencies'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:125:in `analyze'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:422:in `analyze'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:244:in `block in resolve_dependencies'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in `part'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:243:in `resolve_dependencies'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:162:in `set up!'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/command/set up.rb:52:in `run'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in `run'
/Customers/builder/.rbenv/variations/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.15.2/bin/pod:55:in `<high (required)>'
/Customers/builder/.rbenv/variations/3.0.4/bin/pod:25:in `load'
/Customers/builder/.rbenv/variations/3.0.4/bin/pod:25:in `<primary>'
Error: CocoaPods's specs repository is simply too out-of-date to fulfill dependencies.
To replace the CocoaPods specs, run:
pod repo replace
Error working pod set up
Because of the lack of a macOS machine, I used “Codemagic” for constructing and publishing the app.
I attempted resolving this by looking a number of articles on Stack Overflow, however they have been considerably outdated and did not assist me. That is why I am asking this.
I tried to replace all Firebase packages, however the difficulty persevered. I additionally experimented with numerous Flutter variations like “3.19.0,” “3.22.0,” “3.22.2,” and “3.23.0-0.1-pre,” together with completely different CocoaPods variations like “1.15.2” and “1.15.0,” however sadly, no resolution was discovered.