Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter IOS Cocoapods 'Error output from Cocoapods:'

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.

like image 795
Denis Ken Avatar asked Oct 20 '25 19:10

Denis Ken


1 Answers

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

like image 177
Denis Ken Avatar answered Oct 23 '25 08:10

Denis Ken