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

相关推荐
从零开始的ops生活18 小时前
【Day 42】Shell-expect和sed
linux·运维·ssh·shell·expect
半梦半醒*2 天前
ansible的playbook练习题
linux·运维·服务器·ssh·ansible·运维开发
山川而川-R4 天前
SSH传输文件-本地远程控制orangepi-上传、下载
运维·ssh
追逐时光者4 天前
一款为程序员和运维人员量身打造的一站式开发运维利器
数据库·docker·ssh
Molesidy4 天前
【Git】对于github的本地ssh客户端的配置与分支的使用
git·ssh·github
半梦半醒*5 天前
playbook剧本
linux·运维·服务器·ssh·ansible·运维开发
花椒和蕊6 天前
记录git报错ssh: connect to host github.com port 22: Connection timed out,已解决
git·ssh·github
__Always7 天前
Tortoisegit配置ssh教程
ssh·tortoisegti
wjm05198 天前
jenkins使用publishover ssh 进行远程连接
运维·ssh·jenkins
会说话的吹风机8 天前
五、VSCODE SSH连接linux服务器免密登录
服务器·vscode·ssh