在Launchpad的other中打开Terminal,然后输入:
xcodebuild -showsdks
然后提示错误:
**********-Mac:~ wenpd$ xcodebuild -showsdks
xcode-select: error: tool ‘xcodebuild’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance
wenpeidings-Mac:~ wenpd$ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
然后按网上的提示切换路径:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
结果路径不对,原来为了方便,我将Xcode安装在桌面,路径应该是:
sudo xcode-select --switch /Users/myname/desktop/Xcode.app/Contents/Developer
********-Mac:/ myname$ xcodebuild -showsdks
iOS SDKs:
iOS 11.1 -