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 打开项目

相关推荐
kaisun641 天前
树莓派4B无头安装与远程连接踩坑记:从零到SSH成功
ssh·raspberry·嵌入式实践
九成宫1 天前
SSH 密钥操作经历与 VSCode 远程连接“找不到ssh安装”解决
运维·vscode·ssh
MMendex1 天前
华为云项目实战day1
linux·服务器·nginx·华为云·ssh·负载均衡
相思难忘成疾1 天前
《RHEL9虚拟机部署及SSH远程登录实践手册》
linux·运维·ssh·虚拟机
热爱生活的五柒2 天前
vscode通过remote-ssh一直链接不上远程主机
ide·vscode·ssh
头发那是一根不剩了3 天前
Ubuntu 系统修改 SSH 端口完整操作文档
ubuntu·ssh
kebidaixu3 天前
VS Code安装 Remote - SSH 扩展
linux·服务器·ssh
Rabbit_QL3 天前
GitHub 多账号 SSH 配置指南:让个人和工作账号共存
运维·ssh·github
jnrjian3 天前
Offending ECDSA key in /home/oracle/.ssh/known_hosts:16
运维·ssh