Solution for CocoaPods slow (GEM and pod repo change source)

Gem change source

Sources --remove https://rubygems.org/ # $gem $gem sources -a to remove the default source https://gems.ruby-china.org/ # add Ruby $gem sources -l China image

Make sure only the gems.ruby-china.org source is available

Pod repo change source

$pod repo

The default is the GitHub source

Master - Type: git (Master) - URL: https://github.com/CocoaPods/Specs.git - Path: /Users/cheng/.cocoapods/repos/master 1 repo

Let’s change it to a Coding.net source

$pod, repo, remove, master $, pod, repo, add, master, https://git.coding.net/CocoaPods/Specs.git $, pod, repo, update

If the pod repo add is executed, the following error occurs,

Solution for CocoaPods slow (GEM and pod repo change source)
error

then use the following methods

$git, clone, https://git.coding.net/CocoaPods/Specs.git, ~/.cocoapods/repos/master $, pod, repo, update

Also, if there is one in the Podfile file

Source'https://github.com/CocoaPods/Specs.git'

Also need to change it to repo source, or still use GitHub source
, after the above steps are completed, you can use

$pod install $pod update