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

相关推荐
Web3探索者8 天前
可视化服务器管理和传统命令行区别是什么?新手教程:Linux 运维到底该用图形界面还是 SSH 命令行?
linux·ssh
开发者联盟league14 天前
安装pnpm
ssh
2601_9618752415 天前
决战申论100题2026|最新|范文
linux·容器·centos·debian·ssh·fabric·vagrant
小小小花儿15 天前
SSH密钥配置(免密连接远程服务器)
服务器·ssh
m0_5261194016 天前
ssh key生成,gitee配置ssh
运维·gitee·ssh
qq_3384323716 天前
VSCode Remote-SSH 远程 Windows Server 卡死的排查与解决
windows·vscode·ssh
着迷不白16 天前
十、网络客户端工具curl, wget, ssh, scp, sftp, rsync
运维·网络·ssh
江畔柳前堤16 天前
github实战指南01-账号配置与 SSH 密钥
运维·人工智能·深度学习·ssh·github·pyqt·信号处理
相醉为友17 天前
Trae IDE WSL2/SSH 环境网络故障排查笔记
ide·笔记·ssh
c2385618 天前
git常见错误和ssh验证推送
运维·git·ssh