mac M1 cocoapods correct architecture? flutter run won't install pods properly

Viewed 1522

I am having some issues with cocoapods and architecture i think on my mac M1. Here is what I get when I do flutter run

console output

I think it is a problem with architecture. when i run arch in my terminal it shows i386

However when I run arch from vscode terminal this is what I get enter image description here

2 Answers

Try to uninstall all cocoapods and gem

sudo gem uninstall cocoapods

And install again using brew

brew install cocoapods

Then clean all your pods. run this command on your terminal

flutter clean
rm -Rf ios/Pods
rm ios/Podfile.lock
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec

You may have fixed this already, but for anyone else this just worked for me with a similar problem on my M1 Macbook Pro:

flutter clean
rm ios/Podfile.lock
flutter pub get
cd ios
arch -x86_64 pod repo update
arch -x86_64 pod install

Not sure why your terminal gives a different architecture than inside VS Code. Mine are the same.

Related