4

I was running my iOS app on emulator without problem. After I tried to implement facebook login, my Flutter project started to require Cocoapods installed.

After Cocoapod Installed I tried to flutter run on iOS emulator, but I'm getting this error:

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running pod install...                                           2.043ms
CocoaPods' output:
      Preparing

    Analyzing dependencies

    Inspecting targets to integrate
      Using ARCHS setting to build architectures of target Pods-Runner: (``)

    Fetching external sources
    -> Fetching podspec for Flutter from Flutter
    -> Fetching podspec for flutter_facebook_auth from .symlinks/plugins/flutter_facebook_auth/ios

    Resolving dependencies of Podfile

Error output from CocoaPods:
↳
    /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require':
    dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle, 9): no suitable image found.  Did find: (LoadError)
        /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle: mach-o, but wrong architecture
        /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle: mach-o, but wrong architecture -... etc

Why I was running normally without this Cocoapods installed and just today it's necessary to run on my Emulator? And now I'm getting all this errors!

PS: My Podfile already is configured with plataform: ios, '9.0' and I don't have a developer account in ios.

1 Answer 1

6

I found the resolution.

On project path, open the terminal and run gem install ffi

On Podfile directory run arch -x86_64 pod install or pod install on terminal

Sign up to request clarification or add additional context in comments.

1 Comment

gem install ffi helped on m1 setup, thx !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.