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

相关推荐
不剪发的Tony老师10 小时前
Navop:一款工具搞定数据库、SSH、SFTP、远程桌面、AI Agent
运维·数据库·ssh
与自己和解7411 天前
使用ssh实现 VScode 直连 ubuntu
vscode·ubuntu·ssh
lingran__2 天前
Git 完全指南(三):远程仓库与标签管理
开发语言·git·gitee·ssh·团队协作·远程仓库·分布式版本控制
Tassel_YUE2 天前
非 ansible 主机批量执行命令方法:psssh 和 pscp(随手记)
linux·网络·ssh·scp·ansible
JZZC23 天前
1.1 基础的SSH配置
计算机网络·ssh
深念Y5 天前
Windows 11 工具链部署与 SSH 踩坑笔记
windows·笔记·ssh
mooooooooooye6 天前
2026 年跨平台 SSH 客户端怎么选?Xterminal、Termius、MobaXterm 谁更合适
服务器·网络·ssh
小王C语言6 天前
Windows 无法使用 ssh 连接虚拟机(ubuntu),网络没问题的情况下
运维·ssh
mooooooooooye7 天前
SSH 工具越用越乱,Xterminal 先清掉这三类失效连接
运维·ssh·github
梓沂8 天前
SSH 公钥认证配置指南:从生成密钥到配置 SFTP 服务器
ssh