執(zhí)行pod install失敗,錯誤提示:
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist, use `xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools (or see `man xcode-select`)
原因:上述問題是由于Xcode的路徑未選擇,或者路徑錯誤導(dǎo)致的。
如果你在命令行中執(zhí)行過這行代碼以后:
sudo xcode-select -switch? /Applications/Xcode.app
出現(xiàn)的上述問題,那你更需要繼續(xù)讀下去,因?yàn)檫@肯定可以解決你的問題。
這種情況大多發(fā)生在剛剛更新了cocoa pods 或者電腦中存在兩個Xcode
解決方法:
運(yùn)行Xcode

進(jìn)入xcode偏好設(shè)置。

選擇Locations,將Command Line Tools 進(jìn)行選擇,然后重新執(zhí)行pod install即可。