Flutter IOS Cocoapods 'Error output from Cocoapods:'

1,295

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

Share:
1,295
Denis Ken
Author by

Denis Ken

Updated on January 01, 2023

Comments

  • Denis Ken
    Denis Ken over 1 year

    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.

  • petras J
    petras J over 2 years
    gem install ffi helped on m1 setup, thx !