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

相关推荐
刘梦薇5 小时前
SSH连接失败connection reset解决办法
linux·运维·ubuntu·ssh·腾讯云
三言老师18 小时前
秘诀-如何远程SSN访问家里的八台电脑(frp 实操方案)
linux·运维·ssh
柒号华仔1 天前
「速通Shell」聚砖成墙,Shell函数封装之道
linux·ssh·bash
整点bug1 天前
AI 运维该不该自动执行命令?
运维·ssh·openai
进击的码力1 天前
win11 使用ssh 遇到权限too open 无法登录服务器的问题
运维·服务器·ssh
zhengqiqiqinqin2 天前
Ubuntu16.04 升级ssl到3.5.7、升级ssh到9.8p1
网络协议·ssh·ssl
像风一样自由20203 天前
加强版VScode结合remote-ssh远程连接服务器开发指南
服务器·vscode·ssh
国际云,接待3 天前
云服务器 SSH 被扫爆了怎么办:安全组、密钥登录与 Fail2ban 的完整加固清单
服务器·安全·ssh
RisunJan4 天前
Linux命令-ssh-keyscan(从主机收集公钥)
linux·ssh
RisunJan5 天前
Linux命令-sshd(SSH 服务器守护进程)
linux·服务器·ssh