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

相关推荐
秦时明月天明19 小时前
GitLab SSH Key 过期:git pull failed : remote your ssh key has expired
git·ssh·gitlab
白里透白的小白2 天前
复盘 Git+GitHub SSH 配置:从权限报错到免密推送的全流程解决方案
git·ssh·github·版本控制
西京刀客2 天前
Mac下ssh终端之iTerm2 (Oh My Zsh + powerlevel10k)
运维·macos·ssh·iterm2
jimy12 天前
在一台电脑上生成多个ssh公钥并添加到不同GitHub账号
运维·ssh·github
ℳ₯㎕ddzོꦿ࿐3 天前
先立后破:Linux 下“新建管理员 → 验证 → 禁用 root 远程 SSH”的零翻车笔记
linux·笔记·ssh
jiafuLi20183 天前
TortoiseGit 和本地 Git 共享 SSH 密钥和用户配置
运维·git·ssh
一点晖光3 天前
ssh连接慢的原因调查及解决方案
运维·ssh
阿巴阿巴boer3 天前
用wsl搭建远程linux服务器
linux·运维·服务器·ssh
我是koten4 天前
用Ansible查找文件并记录文件名的playbook
linux·运维·centos·ssh·ansible·find·playbook
炼丹精神小伙4 天前
ssh通过多跳板机连服务器
运维·服务器·ssh