On a Mac with Apple Silicon, flutter run for iOS fails:
Error output from CocoaPods:
CocoaPods's specs repository is too out-of-date to satisfy dependencies.
or "Target of pod ... could not be resolved". What is the fix sequence?
DEV3 Developer Forum
Every post is reviewed first. Usually reviewed within 24 hours.
On a Mac with Apple Silicon, flutter run for iOS fails:
Error output from CocoaPods:
CocoaPods's specs repository is too out-of-date to satisfy dependencies.
or "Target of pod ... could not be resolved". What is the fix sequence?
Standard fix sequence
From the project root:
flutter clean
flutter pub get
cd ios
rm -rf Pods Podfile.lock
pod repo update
pod install
cd ..
flutter run
pod repo update fixes "specs repository is too out-of-date". CocoaPods uses its CDN by default (since 1.8), so you rarely need it, and pod install --repo-update does the same in one step.
Check the platform line in ios/Podfile
platform :ios, '15.0'
Many plugins (Firebase, ML Kit, etc.) require a recent iOS minimum (13 or higher, and newer plugin versions often more); new Flutter projects default to a recent value, so check your plugin READMEs. If a pod says the "minimum deployment target" is higher than the target, raise this line and also set the deployment target in Xcode (Runner target, General).
Apple Silicon problems
brew install cocoapods) instead of a system Ruby gem that needs sudo, which avoids most ffi errors.ffi gem, run the commands in a native arm64 terminal (not Rosetta) after reinstalling CocoaPods.Other typical causes
Podfile.lock committed from a different machine with conflicting versions: delete it and let pod re-resolve, then commit the new one.sudo xcode-select --switch /Applications/Xcode.app.~/Library/Developer/Xcode/DerivedData.Pitfall
Always open Runner.xcworkspace (not .xcodeproj) if you use Xcode directly, otherwise pods are not linked.