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

相关推荐
十月ooOO17 小时前
小米AX3000T 路由器如何开启 SSH 安装 OpenWRT 系统,不需要降级 v1.0.91 (2025)
网络·ssh·路由器·openwrt
Aimeast18 小时前
关于选择最佳.NET Core SSH服务器库的全面分析
c#·ssh
davenian2 天前
< OS 有关 > Ubuntu 24 SSH 服务器更换端口 in jp/us VPSs
linux·ubuntu·ssh
张海森-1688202 天前
MobaXterm通过ssh远程连接Ubuntu的方法
ubuntu·ssh
我吃西红柿112 天前
Linux配置SSH公钥认证与Jenkins远程登录进行自动发布
linux·ssh·jenkins
服务端相声演员3 天前
CentOS建立ssh免密连接(含流程剖析)
linux·centos·ssh
全息数据4 天前
vscode通过ssh连接服务器实现免密登录+删除
服务器·vscode·ssh
悟空空心6 天前
服务器A到服务器B免密登录
ssh
Natsuagin7 天前
Git 本地项目上传 GitHub 全指南(SSH & Token 两种上传方式详细讲解)
linux·windows·git·ssh·github
大熊程序猿7 天前
jenkins 配置ssh拉取gitlab
ssh·gitlab·jenkins