CocoaPods stops at Analyzing dependencies solution,
Currently, many open-source projects are applicable to cocoapod, which facilitates the integration of third-party libraries and does not need to set any parameters or dependencies in the project.
However, when executing pod update or pod install, it is often stuck in Analyzing dependencies. In this step, cocoapods is downloading his information ~ Under the/cocoapods directory, you can access this directory and view the download progress through du-sh *. The content is the podspec file hosted on https://github.com/cocoapods/specs. Currently () This directory is about mb. We all say it is because github is very slow... you know (but I seriously suspect it may not be the reason ). So it's stuck here.
Solution:
1: Change image index Library
A cocoapods index database image has been created in China. You can use the following command to change the image:
Pod repo remove master
Pod repo add master https: // image address
Pod repo update
I have always liked official sources, so I have never used this method. Please google
2: delete the image and download it again [recommended]
I don't know why this method works. It is said that it has something to do with xcode and is seen on stackoverflow. It can't be downloaded during the install operation. This method should not be used. However, the test is easy to use. You can try:
Pod repo remove master # Delete Image
Pod setup # re-download. It may take some time
At this time, you can run the pod install or update operation smoothly. Of course, you still have to wait.
3: Index Update prohibited
The following parameters can be used to skip the update of the index file during installation or upgrade, but the problem is also very troublesome. You may not be able to download the new version of the third-party library (because the index is old ).
Pod install -- verbose -- no-repo-update
Pod update -- verbose -- no-repo-update
About CocoaPods installation and use, Command help and so on are here: https://cocoapods.org