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:
Need to be executed during installation
1
sudo gem install cocoapods
1
sudo arch -x86_64 gem install ffi
Needed every time
you should use ‘arch -x86_64 pod install’ instead of ‘pod install’