1. 执行“
xcodebuild -showsdks
”,报错如下“
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
”
2. 执行“
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
”切换到当前Xcode路径下
3. 执行"
xcodebuild -showsdks
6.执行
xcrun --sdk iphoneos --show-sdk-path
7.成功