Flutter common issues

🛠️ CocoaPods iOS Deployment Version Error

Issue:
While running pod install or pod install --repo-update, You may encounter the error:

“requires a higher minimum iOS deployment version than the plugin’s reported minimum version.”

This usually happens when the installed version of CocoaPods or some of its dependencies aren’t configured correctly for your Flutter iOS project.

💡 Solution:
Here’s the step-by-step fix that worked for me:

1. Reinstall the ffi gem

The ffi gem is a dependency of CocoaPods, and in some cases, reinstalling it with memory allocation enabled solves compatibility issues.

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

2. Reinstall CocoaPods

To ensure CocoaPods is fresh and properly linked:

sudo gem uninstall cocoapods
sudo gem install cocoapods

3. Re-run the Pod command

Once both are reinstalled, run the command again:

pod install --repo-update

✅ This resolved the issue for me and allowed the project to compile without further iOS deployment version errors.