【Mac】安装cocoapods

1.安装cocoapods

sudo gem install cocoapods --user-install

提示:

WARNING:  You don't have /Users/mmy/.local/share/gem/ruby/2.6.0/bin in your PATH,
	  gem executables will not run.

2.打开文件

open ~/.zshrc

3.配环境

export PATH=/Users/mmy/.local/share/gem/ruby/2.6.0/bin:$PATH

3.重置

source ~/.zshrc

4.验证pod

pod --version

5.官方文档
https://guides.cocoapods.org/using/getting-started.html#installation
6.给git设置代理

open ~/.gitconfig

编辑文件

[http]
        proxy = socks5://127.0.0.1:7890
	    proxy = http://127.0.0.1:7890
[https]
        proxy = socks5://127.0.0.1:7890
	    proxy = https://127.0.0.1:7890

7.打开项目的ios文件夹的终端

pod install

你可能感兴趣的:(Flutter,macos,cocoapods,xcode)