When we use pod install to initialize our cocoaPods IOS project. You may stuck at the following (which you have to use control+C to stop the process):
If you google this forever wait problem, some answers will let you try this command instead:pod install --verbose --no-repo-update
However, this will not throughly solve the problem, you may face the new forever wait at: (same for using control+C to stop the process)
By trying a lot of answers on the Stackoverflow, the following in one works for me:
pod repo remove master
pod setup
Here, you may have a message indicating that your cocoaPods version is too old. (By using pod --version
you can check your version)
To update the cocoaPods, you need sudo gem install cocoapods
. Also, you may face another problem like:
If this error occurs, try this one sudo gem install -n /usr/local/bin cocoapods
.
Then, type pod --version
again, you will have the latest version. Then try pod setup
again, you may meet a new problem (…SE is full of meeting new problem and fixing it…)
Type this command: sudo rm -fr ~/.cocoapods/repos/master
And then pod setup
. It should work, you are downloading the relevant files from git…
Finally, try pod install
Your origin problem “forever wait” should be fixed.