禅城区网站建设公司seo与网站建设
安装homebrew
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)" 
再按照成功提示配置环境变量
ruby
更新ruby到最新
brew install ruby 
如果安装了会自动升级
安装完成后根据提示配置环境变量
再执行命令使其生效
source ~/.zshrc 
安装cocoapods
sudo gem install cocoapods 
完成后执行
pod setup 
cocoapods换源
$ cd ~/.cocoapods/repos 
$ pod repo remove master
$ git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master 
然后在项目Podfile中第一行
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git' 
cocoapods安装NMSSH
在podfile中,添加依赖以及版本
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
platform :macos, '11.0'target 'app' douse_frameworks!# 添加 NMSSH 依赖pod 'NMSSH', '~> 2.3.1'
end 
再执行
pod install 
最后通过 .xcworkspac 打开项目
