Pits encountered in the first installation of cocoapods


Recently, I want to write an IOS application, so I need to install the development environment. It took half a day to install cocoapod, so I will not forget it later.

1. Use gem to install. There are many on the Internet. I won’t write them in detail.

Then, when you use pod install, you encounter an error:Unable to add a source with url https://cdn.cocoapods.org/ named trunk“

After searching, you need to delete the master directory under the original repo. Then run it
pod repo add master https://github.com/CocoaPods/…

It’s been stuck here for a long time. I can’t help but give up. It’s very slow to use other git sources.

Continue to search, read an article https://www.jianshu.com/p/d32…
Found that if the following is very slow, you can package and download the zip file, but encountered a problem, zip packaging is also very slow, the original zip file also has more than 300 MB, using thunderbolt download, but very slow.
Since the foreign source is very slow, I don’t want to go over the wall, so I think of using the domestic source
This is the source of my own clone https://gitee.com/jiangyu/Spe…
But this source can’t be downloaded using git clone. I don’t know why. Combined with the view that you can download the zip, you can download the zip file.

It took about 5 minutes to unzip this file with the zip of MAC. So far, the installation of pod install is successful.