Run cocoapod on Apple M1 computer

Cocoapod is a commonly used package management tool in iOS development. However, if you use this tool on a computer with Apple M1 chip, you may encounter some problems. For example, the following error:

/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.3/lib/ffi/library.rb:275: [BUG] Bus Error at 0x0000000100320000

This is actually caused by the fact that CocoaPod is not fully compatible with Apple M1. To avoid this, you need:

  1. Need to be executed during installation
sudo gem install cocoapods
sudo arch -x86_64 gem install ffi
  1. Needed every time

you should use ‘arch -x86_64 pod install’ instead of ‘pod install’

arch -x86_64 pod install

本文标题:Run cocoapod on Apple M1 computer

文章作者:Morning Star

发布时间:2021年07月04日 - 06:07

最后更新:2022年01月14日 - 11:01


许可协议: 署名-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。