0

I dont know how to solve this error i am using first time flutter in MacBook

Running pod install... 990ms CocoaPods' output: ↳ CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update

Error output from CocoaPods: ↳ Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5 WARNING: CocoaPods requires your terminal to be using UTF-8 encoding. Consider adding the following to ~/.profile:

    export LANG=en_US.UTF-8
    
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization
not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:166:in `unicode_normalize'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:166:in `installation_root'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:226:in `podfile_path'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:105:in `markdown_podfile'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:30:in `report'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:66:in `report_error'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/claide-1.1.0/lib/claide/command.rb:396:in `handle_exception'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/claide-1.1.0/lib/claide/command.rb:337:in `rescue in run'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/claide-1.1.0/lib/claide/command.rb:324:in `run'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/bin/pod:23:in `load'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/bin/pod:23:in `<main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization
not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:166:in `unicode_normalize'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:166:in `installation_root'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:226:in `podfile_path'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:205:in `podfile'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:160:in `verify_podfile_exists!'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:46:in `run'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/bin/pod:23:in `load'
    from /usr/local/Cellar/cocoapods/1.11.3/libexec/bin/pod:23:in `<main>'

Error running pod install Error launching application on iPhone 14 Pro Max.

Ankush
  • 77
  • 7

1 Answers1

0

Seems after upgrading the MacOS to v13, gem will use universal-darwin22 to compile files. If you check /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ there is only universal-darwin21 availble. So, the solution is simple, try to create a link for universal-darwin22 then install ffi.

On terminal:

cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/

sudo ln -sf universal-darwin21 universal-darwin22

sudo gem install ffi
Keyvan
  • 1
  • 2