When attempting "flutter run" from step 3.5 of the official "Add Firebase to your app" tutorial with the standard flutter starter app (So as to limit other potential issues) (See https://firebase.google.com/docs/flutter/setup?authuser=0&hl=en&platform=ios), I get the following output in the debug console:
{ from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in section' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:240:in
resolve_dependencies’
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in install!' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in
run’
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in run' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in
run’
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in <top (required)>' from /usr/local/bin/pod:23:in
load’
from /usr/local/bin/pod:23:in `’
Error: To set up CocoaPods for ARM macOS, run:
arch -x86_64 sudo gem install ffi
Error running pod install
Error launching application on iPhone 12.
Exited}
And then when I run the suggested:
{arch -x86_64 sudo gem install ffi}
It appears to run successfully, printing:
{Building native extensions. This could take a while…
Successfully installed ffi-1.15.5
Parsing documentation for ffi-1.15.5
Done installing documentation for ffi after 3 seconds
1 gem installed}
But if I then re-run "flutter run", I get exactly the same error as before.
I’ve tried flutter clean, uninstalling and reinstalling the -x86_64 versions of both ffi and cocoapods but still keep getting the same error…
Any ideas?
2
Answers
Managed to solve this by running
arch -x86_64 pod install
from the /ios folder.Try this:
Podfile.lock
file in the iOS folder of your flutter project.arch -x86_64 sudo gem install ffi
and thenarch -x86_64 pod install
.