MAC computer M1, M2 Cocoapods problem

On November 11, 2020, Apple officially released the first self-developed computer chip M1 for Mac. Due to the ARM architecture, there are still quite a few Mac software that have not been upgraded to support the ARM architecture and cannot run on Mac computers with M1 chips. If your application is a general-purpose application and there is an incompatibility problem, you can run the program in the mode of "check Open with Rosetta" (the default method for Intel chips).
The final solution is as follows:

1、打开访达->应用->实用工具->终端->右键点击终端->显示简介->勾选使用 Rosetta 打开,关闭终端,重新打开。
2、打开访达->应用->Xcode->右键点击Xcode->显示简介->勾选使用 Rosetta 打开,关闭Xcode,重新打开。
3、安装CocoaPods
4、安装完CocoaPods之后 执行下面两个安装命令即可
sudo gem install cocoapods
sudo gem install ffi


The command of the terminal pod uses:

Tried and still reported an error, then used the following command

sudo arch -x86_64 gem install ffi

1

arch -x86_64 pod install

1

arch -x86_64 pod update

Guess you like

Origin blog.csdn.net/super_man_ww/article/details/127284199