Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cocoapods: pod update and pod install takes forever

Tags:

cocoapods

I try to update my podfile using the command pod update but it takes forever. I did also all the steps according to this question cocoapods - 'pod install' takes forever but nothing changed. Using the command pod update --verbose i see that it stops here: Updating spec repo master $ /usr/bin/git pull --ff-only Any suggestion?

like image 450
euthimis87 Avatar asked Aug 03 '14 22:08

euthimis87


2 Answers

CocoaPods has to download a repository of all podspecs to do its work. It seems like it's that pull operation that's taking a long time. I'm not aware of any way to accelerate that process.

However subsequent pod operations will be much faster until new commits are available in the master spec repo. So if you have several update or install operations, doing them together can save you some time.

like image 192
Fabian Avatar answered Oct 17 '22 10:10

Fabian


There is a rate limiting on git servers and that seems to slow down the process. Like Fabian said there is no valid solution at the moment but splitting the update to individual pods. There is an explanation at the CocoaPods blog Master spec-repo rate limiting post‑mortem, it seems we need to wait for 1.0.0.beta.7 before they fix the issue. Meanwhile, this Git Issue on the topic recommends to run convert your Podspecs to be a full copy instead of a shallow clone, by running:

cd ~/.cocoapods/repos/master && git fetch --depth=2147483647
like image 35
Idan Avatar answered Oct 17 '22 11:10

Idan