homebrew,gem,cocoapod 换源,以及安装依赖

安装homebrew

bash 复制代码
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

再按照成功提示配置环境变量

ruby

更新ruby到最新

bash 复制代码
brew install ruby

如果安装了会自动升级

安装完成后根据提示配置环境变量

再执行命令使其生效

bash 复制代码
source ~/.zshrc

安装cocoapods

bash 复制代码
sudo gem install cocoapods

完成后执行

bash 复制代码
pod setup

cocoapods换源

bash 复制代码
$ cd ~/.cocoapods/repos 
$ pod repo remove master
$ git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master

然后在项目Podfile中第一行

bash 复制代码
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'

cocoapods安装NMSSH

在podfile中,添加依赖以及版本

bash 复制代码
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
platform :macos, '11.0'

target 'app' do
  use_frameworks!

  # 添加 NMSSH 依赖
  pod 'NMSSH', '~> 2.3.1'
end

再执行

bash 复制代码
pod install

最后通过 .xcworkspac 打开项目

相关推荐
API开发10 天前
苹果芯片macOS安装版Homebrew(亲测) ,一键安装node、python、vscode等,比绿色软件还干净、无污染
vscode·python·docker·nodejs·openssl·brew·homebrew
half-beast10 天前
ganymed-ssh2连接openssh 8.2
java·ssh·openssh·ganymed
qq_2148032910 天前
systemd[1]: Failed to start LSB: Bring up/down networking
ssh
家庭云计算专家11 天前
群晖如何开启及使用ssh:小白用户上手指南-家庭云计算专家
运维·云计算·ssh·onlyoffice
SH11HF11 天前
小菜狗的云计算之旅,shell脚本语言的基本内容和用法
运维·网络·云计算·ssh
KIKU啊11 天前
Docker+PyCharm+ssh部署深度学习docker环境
docker·pycharm·ssh
问~13 天前
gitea本地部署代码托管后仓库的新建与使用(配置好ssh密钥后仍然无法正常克隆仓库是什么原因)
运维·ssh·gitea
fangeqin13 天前
CentOS 8解决ssh连接github时sign_and_send_pubkey失败问题
centos·ssh·github
阿乾之铭13 天前
推送项目到GitHub
ssh·github·bash
aashuii13 天前
go客户端ssh交换机
开发语言·golang·ssh