CocoaPods not installed or not in valid state CocoaPods not installed or not in valid state ios ios

CocoaPods not installed or not in valid state


usually this happens due to visual studio or IntelliJ not able to find the path or associated plugin or extension.

here is the solution:

  1. sudo gem uninstall cocoapods && sudo gem install cocoapods
  2. restart IDE or Editor

the last step should solve the issue if not close the project entirely


This problem might be because you have multiple versions of cocoapods installed.

You can check and resolve it running:

  • gem list check to see if multiple versions of cocoapod are installed
  • sudo gem uninstall cocoapods it will prompt you to select which one to uninstall, or if you want to uninstall all
  • sudo gem install cocoapods

Additional step if you uninstalled all cocoapods

  • Change to the iOS directory of your Flutter project
  • pod install

That should then allow you to run an xcode build to an iOS device.


Reinstalling the flutter extension on visual code fixed this