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

相关推荐
catoop16 小时前
在 WSL 的 Ubuntu 中安装和配置 SSH 服务
linux·ubuntu·ssh
lxmyzzs1 天前
vscode-ssh无法进入docker问题解决
vscode·docker·ssh
程序员陆通3 天前
CentOS/AlmaLinux 9 中 SSH 服务启动失败:OpenSSL 版本不匹配解决
linux·centos·ssh
小马哥编程3 天前
JWT 是由哪三个部分组成?如何使用JWT进行身份认证?
网络协议·http·架构·ssh
小马哥编程4 天前
【软考架构】案例分析-web应用设计:SSH 和 SSM(Spring + Spring MVC + MyBatis ) 之间的区别,以及使用场景
前端·架构·ssh
半夏微凉半夏殇4 天前
VSCode Remote-SSH:无缝远程开发完全指南
ide·vscode·ssh
YuanDaima20485 天前
GitHub 与 Gitee 多平台 SSH Key 配置指南
gitee·开源·ssh·github·开源软件·key·免密登录
Fluency-115 天前
ubuntu中ssh连接root用户
linux·ubuntu·ssh
潮汐退涨月冷风霜5 天前
VSCode SSH远程连接失败 最速解决方案
ide·vscode·ssh
2021黑白灰5 天前
windows11 vscode ssh远程linux服务器/虚拟机 免密登录
linux·服务器·ssh