Skip to content
Latchkey

Flutter "Podfile is out of date" in iOS Builds

Flutter generated plugin podspecs that no longer match the committed Podfile.lock. After adding or upgrading a plugin, the iOS pods must be re-resolved or the build fails or links stale code.

What this error means

A flutter build ios/flutter build ipa warns "Podfile out of date" or fails in the CocoaPods step because the plugin pods Flutter generated do not match ios/Podfile.lock. It appears after a pubspec.yaml plugin change.

Flutter output
Warning: Your Podfile is out of date because your Flutter plugins changed.
Running pod install...
[!] CocoaPods could not find compatible versions for pod "some_plugin".

Diagnose it: SDK, signing, or simulator?

Mobile CI failures cluster into three: a missing or mismatched SDK component, a code-signing identity that does not exist on the runner, or a simulator or emulator that never became ready.

Terminal
# Android
sdkmanager --list_installed 2>/dev/null | head
echo "ANDROID_HOME=$ANDROID_HOME"
adb devices

# iOS
xcodebuild -version && xcrun simctl list devices available | head
security find-identity -v -p codesigning

Common causes

Plugins changed without re-resolving pods

Flutter writes plugin podspecs from pubspec.yaml. A plugin add/upgrade without a pod install leaves ios/Podfile.lock stale.

Stale generated Flutter config in ios/

The ios/Flutter/Generated.xcconfig and pod references can lag if flutter pub get was not run before the iOS build.

How to fix it

Re-resolve pub then the iOS pods

Get pub packages (which regenerates plugin config), then reinstall pods in ios/.

Terminal
flutter pub get
cd ios && pod install --repo-update

Clean when the lock is badly out of sync

Terminal
flutter clean
flutter pub get
cd ios && rm Podfile.lock && pod install

How to prevent it

  • Run flutter pub get before the iOS build in CI.
  • Commit ios/Podfile.lock and regenerate it when plugins change.
  • Cache ~/.pub-cache and ~/.cocoapods keyed on your lockfiles.

Frequently asked questions

What causes Flutter "Podfile is out of date" in iOS builds?
There are 2 common causes: plugins changed without re-resolving pods and stale generated flutter config in ios/. Flutter writes plugin podspecs from pubspec.yaml.
How do I fix Flutter "Podfile is out of date" in iOS builds?
There are 2 fixes depending on which cause you have: re-resolve pub then the ios pods and clean when the lock is badly out of sync. Work through them in order, since the first is the most common.
What does Flutter "Podfile is out of date" in iOS builds actually mean?
A flutter build ios/flutter build ipa warns "Podfile out of date" or fails in the CocoaPods step because the plugin pods Flutter generated do not match ios/Podfile.lock.
How do I stop Flutter "Podfile is out of date" in iOS builds happening again?
Run flutter pub get before the iOS build in CI. The prevention section lists 3 changes that keep it from recurring.

Related guides

References

Not every red build is your code. Latchkey repairs the ones that are not, on the runner. Start free → 30-day trial · No credit card