Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

flutter run on iOS or macOS stops with Error running pod install

ErrorError running pod install

Short answer

Flutter only reports that pod install failed; the reason is in the lines just above it. Run pod install yourself from the ios folder to see them. The common causes are CocoaPods missing or too old, a broken ffi gem on an Apple Silicon Mac, an out-of-date specs repository, a stale Podfile, or root-owned CocoaPods caches.

  • Applies to Flutter 3.50 stable, CocoaPods 1.16, Xcode 26, macOS on Apple Silicon
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Run the step Flutter ran, by hand, from the iOS folder. The real error prints above the Flutter summary.

    cd ios
    pod install
    pod --version
  2. 2Match what you see, then jump to its fix

    1. 1Warning: CocoaPods not installed. Skipping pod install. / Warning: CocoaPods minimum required version 1.10.0 or greater not installed.CocoaPods is not installed, or is older than Flutter acceptsFix
    2. 2Error: To set up CocoaPods for ARM macOS, run:The ffi gem is broken on an Apple Silicon MacFix
    3. 3Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.The local CocoaPods specs repository is too old for a pod you needFix
    4. 4Warning: Podfile is out of dateThe Podfile in the project is out of dateFix
    5. 5Permission errors during pod install after an earlier run with sudoCocoaPods caches or folders are owned by rootFix

What does the error look like?

  • Error running pod install
  • Warning: CocoaPods not installed. Skipping pod install.
  • Error: To set up CocoaPods for ARM macOS, run:
  • Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
  • Warning: Podfile is out of date

Cause 1 of 5

CocoaPods is not installed, or is older than Flutter accepts

1Check

pod --version should print a plain version number. Flutter's tool warns below 1.10.0 and recommends 1.16.2 or newer. If pod is not found at all, nothing was installed for the Ruby you are using.

which pod
pod --version

2Fix

Install or update the gem. With the Ruby that ships with macOS you need sudo; with a Ruby from Homebrew or a version manager you do not. A user-level install avoids sudo, but then pod must be on your PATH.

sudo gem install cocoapods
# or, without sudo:
gem install cocoapods --user-install

3Verify

The version prints, and Flutter stops warning about it.

pod --version
flutter doctor -v

Confirmed by guides.cocoapods.org

Did this fix it?

Cause 2 of 5

The ffi gem is broken on an Apple Silicon Mac

1Check

Flutter's tool prints this message when pod install fails on an arm64 Mac and the output mentions ffi_c.bundle or a path containing /ffi/. Read the lines above the message to confirm.

pod install 2>&1 | grep -i ffi

2Fix

Run the command Flutter prints: reinstall the ffi gem with libffi allocation enabled.

sudo gem uninstall ffi && sudo gem install ffi -- --enable-libffi-alloc

3Verify

pod install now runs to the end.

cd ios
pod install

Confirmed by raw.githubusercontent.com

Did this fix it?

Cause 3 of 5

The local CocoaPods specs repository is too old for a pod you need

1Check

A plugin was updated and wants a pod version your local specs copy has never seen. Flutter detects the phrase out-of-date source repos in the output and prints the hint.

pod install 2>&1 | grep -i -B2 -A2 "out-of-date"

2Fix

Update the specs repositories, then install again.

cd ios
pod repo update
pod install

3Verify

pod install finishes and writes Podfile.lock.

ls -l Podfile.lock

Confirmed by raw.githubusercontent.com

Did this fix it?

Cause 4 of 5

The Podfile in the project is out of date

1Check

Flutter exits with this warning when the Podfile no longer matches what the current tool expects, typically after a Flutter upgrade on an old project. It tells you to remove the file so it can be generated again.

git diff --stat -- ios/Podfile

2Fix

If you made no changes of your own to the Podfile, delete it and let Flutter write a new one. If you did, copy your additions aside first and put them back into the new file.

rm ios/Podfile
flutter pub get
flutter run

3Verify

A new ios/Podfile exists and the build gets past pod install.

head -5 ios/Podfile

Confirmed by raw.githubusercontent.com

Did this fix it?

Cause 5 of 5

CocoaPods caches or folders are owned by root

1Check

CocoaPods stopped running as root in version 0.32.0. Files created by a sudo pod install in the past can no longer be written by your normal user.

ls -ld ~/Library/Caches/CocoaPods ios/Pods

2Fix

Remove the root-owned caches and the Pods folder, then install as your normal user.

sudo rm -fr ~/Library/Caches/CocoaPods/
sudo rm -fr ios/Pods/
cd ios && pod install

3Verify

pod install runs as your user without a permission error.

ls -ld ios/Pods

Confirmed by guides.cocoapods.org

Did this fix it?

How do I stop it coming back?

  • Never run pod install with sudo; install the gem with sudo only if your Ruby requires it.
  • Keep CocoaPods updated with the same gem command you installed it with.
  • After a Flutter upgrade, run pod install once from the ios folder before opening Xcode.
  • Commit Podfile.lock so everyone resolves the same pod versions.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.