First time trying to open my flutter project on iOS Simulator CocoaPods error


I’m a beginner on macOS and trying to open my Flutter project on the iOS simulator for the first time. I ran pod --version in the terminal, and it shows the correct version of Cocoapods, so I know it’s installed and added to the path. However, I still can’t run my project—it keeps giving me this error.

I’m not sure how to fix it and could really use some help. Any guidance would be greatly appreciated! :pray:

I can’t say as I can solve your problem but I did have something similar. In my case, cocoapods were installed by Homebrew and then by Ruby. So there were actually two versions out there. The iOS simulator seemed to be trying to grab the Homebrew version instead of the Ruby version. I cannot recall the exact steps to fix this, but I’m fairly sure I had to remove the Homebrew version and the Ruby version and then reinstall the ruby version. All along the way, I kept having to check for files and cocoapod versions. I hope that helps.