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

相关推荐
Tipriest_1 天前
linux git ssh配置过程
linux·git·ssh
维尔切2 天前
Linux中ssh远程登录原理与配置
android·linux·ssh
雪域迷影2 天前
Ubuntu22.04中生成gitee码云的ssh-key并添加到gitee网站上
运维·gitee·ssh·ubuntu22.04
leafpipi2 天前
【机器学习】pycharm使用SSH SFTP 远程连接 ubuntu服务器 进行开发+调试+数据训练
服务器·学习·算法·ubuntu·pycharm·ssh
❀͜͡傀儡师2 天前
修改CentOS的SSH登录端口(22端口)
linux·centos·ssh
SpiderPex3 天前
GitHub下载项目完整配置SSH步骤详解
运维·ssh·github
IvanCodes3 天前
四、Linux核心工具:Vim, 文件链接与SSH
linux·ssh·vim
jennifer-jl3 天前
vscode remote ssh相关问题
vscode·ssh
极客范儿3 天前
新华三H3CNE网络工程师认证—Telnet
网络·ssh·telnet
唐青枫4 天前
Linux sshfs 安全挂载远程文件系统 命令详解
linux·ssh