【Mac】Install cocoapods

1. Install cocoapods

sudo gem install cocoapods --user-install

hint:

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 the file

open ~/.zshrc

3. Configuration environment

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

3. Reset

source ~/.zshrc

4. Verify the pod

pod --version

5. Official document
https://guides.cocoapods.org/using/getting-started.html#installation
6. Set proxy for git

open ~/.gitconfig

edit file

[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. Open the terminal of the ios folder of the project

pod install

Guess you like

Origin blog.csdn.net/weixin_45625639/article/details/131256046