问题
I am updating pods in my project. But cocoapods stucked at "Analyzing dependencies" stage. So I created a sample app to just test cocoapods. Here is my very simple podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
pod 'Masonry'
But result is same. Its stuck at "Analyzing dependencies" stage.
回答1:
You can debug what's going on with:
pod install --verbose
Chances are CocoaPods is updating your local copy of the specs repo. If this is your first time installing pods on your current machine you can use
pod setup
Optionally with --verbose
to watch this clone happen. This could take a few minutes. Alternatively if you aren't worried about pulling the most recent specs repo changes you can run:
pod install --no-repo-update
A quick note about how CocoaPods works. The 'specs' are the files containing the definitions for how CocoaPods configures each library. These specs are stored on GitHub and cloned locally into ~/.cocoapods/repos/master
. Then this local copy is updated periodically as you run commands such as pod install
to make sure you have the newest versions of your specs. Since this is the only network connected piece of CocoaPods that affects installs the better quesetion would be 'is GitHub down' which you can see here. Chances are running your command with the --verbose
flag will shine light on what is actually taking a while.
来源:https://stackoverflow.com/questions/26984087/is-cocoapods-down