-
-
Save monkeymonk/54b283f48a444a5be563833d5bca1b07 to your computer and use it in GitHub Desktop.
Reinstall Cocoapods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# When pod install or pod update gets hanged at "Analyzing dependencies", please consider to reinstall cocoapods. | |
# 1. Uninstallation | |
# Reference: http://superuser.com/questions/686317/how-to-fully-uninstall-the-cocoapods-from-the-mac-machine | |
for x in `gem list --no-versions | grep cocoapods`; do gem uninstall $x -a -x -I; done | |
# 2. Reinstall cocoapods | |
sudo gem install cocoapods | |
# 3. Repairing broken specs | |
# Reference: http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ | |
sudo rm -fr ~/.cocoapods/repos/master | |
pod setup | |
# 4. After setup and edit your Podfile | |
pod install | |
# 5. Force update pods | |
pod update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment