我之前也是遇到很多这种情况 然后我就安装了Alcatraz
打开你的终端
第一步:关闭 Xcode。
第二步:如果你之前安装过Alcatraz,卸载它。运行命令
rm -rf ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin
第三步:最关键的一步,运行命令
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID
sudo xcode-select --reset
第四步:安装 Alcatraz。
curl -fsSL https://raw.github.com/supermarin/Alcatraz/master/Scripts/install.sh | sh
第五步:重新Xcode。
运行Xcode选择 “Load Bundle”
在你下载的Demo中点击Install Pods 就可以了!!