背景
在运行Flutter Macos的时候,提示一下问题,没有找ffi_c.bundle在M1架构处理器下的文件。
代码语言:javascript复制LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi_c.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi_c.bundle - /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi_c.bundle
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require'
解决方案
1.通过gem安装ffi
代码语言:javascript复制sudo arch -x86_64 gem install ffi
2. pod install安装依赖
代码语言:javascript复制cd ./Macos
pod install
参考资料
https://github.com/CocoaPods/CocoaPods/issues/10220