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:

1
/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
1
sudo gem install cocoapods
1
sudo arch -x86_64 gem install ffi
  1. Needed every time

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

1
arch -x86_64 pod install

本文标题:Run cocoapod on Apple M1 computer

文章作者:Morning Star

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

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

原始链接:https://www.mls-tech.info/app/swift/ios-cocoapod-in-apple-m1_en/

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