1、安装需要的Xcode版本
2、安装Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
3、安装最新的ruby环境(可选,系统有自带旧版本的ruby可用)
安装ruby
brew install ruby
添加环境变量
export PATH=/usr/local/opt/ruby/bin:$PATH
source ./.bash_profile
4、安装python2(可选)
macOS12.3以上系统不再内置python2, 并且无法正常安装python2
可以通过pyenv在intel和Apple芯片中安装python2。
按顺序调用以下命令:
brew install pyenv
pyenv install 2.7.18
export PATH="$(pyenv root)/shims:${PATH}"
pyenv global 2.7.18
python --version
需要将上述路径添加到环境变量里面才能全局调用:
echo 'PATH=$(pyenv root)/shims:$PATH' >> ~/.zshrc
source ~/.zshrc
5、安装fastlane
brew install fastlane
6、安装jenkins
brew install jenkins