Reputation: 373
I am working on a flutter project which is built using flutter version 1.22. Recently I bought a MacBook m1. I am facing a worst-case that I couldn't build the project on MacBook. It's showing a long podfile error. This is happening for some firebase packages. Now I am totally stuck. Can not update my app which is live on App Store. If you have any idea or a solution, please help.
Upvotes: 1
Views: 1929
Reputation: 189
Solution for Apple M1 silicon: Please try below commands:
sudo softwareupdate --install-rosetta --agree-to-license
sudo gem uninstall ffi && sudo gem install ffi -- --enable-libffi-alloc
Upvotes: 1
Reputation: 1595
Please try below commands on M1 machine:
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
Upvotes: 2
Reputation: 29547
Update the ruby installation on the Mac. See details at https://github.com/CocoaPods/CocoaPods/issues/9907 and https://betterprogramming.pub/ruby-on-apple-silicon-m1-macs-fb159849b2f5
Upvotes: 0
Reputation: 389
Well, I had this nightmare before. happen when I change and migrate flutter from 1.xx -> 2.xx
Upvotes: 0
Reputation: 2193
I had a similar thing happen to me and this is how I fixed it:
Then if that doesn't work, make sure XCode is up to date, open ios/Runner.xcworkspace. You should see some warning on the left and a prompt asking you to apply the recommended changes.
Upvotes: 0