Finally equipped with your Macbook Pro, which will save you valuable time for your builds and, by the way, protect your ears from a fan that is too loud… Your moment of ecstasy might have been overshadowed by reinstalling your developer tools, and especially your preferred framework and its dependencies to build your iOS applications on Xcode.
In fact, an important step to be able to build under xCode is the famous pod installation to get all the necessary libraries for iOS. While you thought you had installed hombrew, gemstones, rubies, cocoa capsules correctly, you will probably get this delicious error message that will slow down your work.
After exhausting most of the solutions on StackOverflow without success, you’ll wonder what was the shortest way to correctly configure your Silicon Mac for Flutter. Fortunately, you found this article!
Let’s not waste more time, here is the procedure:
This is optional, but you will need it several times, so you might as well do it immediately.
Go to the folder: /Applications/Utilities/Terminal.app
Right click : Duplicate You create then like that a new Terminal which will have the property to start under Rosetta2.
Right click on this new terminal :
Get Info Check the box: open with Rosetta
Close all currently open instances of the Terminal
Open this new Terminal and enter :
sudo gem install ffi
Then install your cocoapods :
sudo gem install cocoapods
Close this Terminal Open the other terminal (the one not configured to be opened by Rosetta) You can finally go to the /ios folder of your Flutter project and run :