How to solve "error running pod install" in flutter on mac?
This happens when we change any plugins versions or flutter pub package.
I was getting a similar error, so I used many different things but still nothing happened but finally I got an exact solution For the solution follow the below steps
podfile.lockfile from the ios folder.
Open the terminal, go to the ios folder directory and run
pod install. It could take some time to install.
pod installgives any error then try this
pod install --repo-update
After everything is done run your project again
Ref:- Running pod install
In Flutter project, I Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version.
- flutter clean
- rm -Rf ios/Pods
- rm -Rf ios/.symlinks
- rm -Rf ios/Flutter/Flutter.framework
- rm -Rf ios/Flutter/Flutter.podspec
- flutter pub get
- cd ios
- pod install
- arch -x86_64 pod install(On an M1 mac use => arch -x86_64 pod install)
- cd ..
- flutter build ios
- flutter run