Ionic构建ios不适用于xcode 8 beta

时间:2016-07-10 09:44:32

标签: xcode ionic-framework

我最近下载了Xcode 8 beta并将其替换为应用程序。现在当我执行“ionic build ios”时,我收到了这个错误:

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
ERROR building one of the platforms: Error: ***/platforms/ios/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: ***/platforms/ios/cordova/build: Command failed with exit code 2
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

我已经尝试过:

1)离子平台rm ios 2)离子平台添加ios

会感激一些建议。谢谢!

2 个答案:

答案 0 :(得分:2)

我发现了我的问题。当您下载Xcode 8 beta时,它被称为“Xcode-beta”。我将它拖入应用程序并简单地删除了旧的Xcode。您实际上需要将“Xcode-beta”应用程序重命名为“Xcode”,以便Ionic识别它。

答案 1 :(得分:1)

如果您运行此命令:

export DEVELOPER_DIR="/Applications/Xcode-beta.app/Contents/Developer"