littlequest
littlequest

Reputation: 329

Ionic build ios does not work with xcode 8 beta

I recently downloaded the Xcode 8 beta and replaced it in applications. Now when I execute "ionic build ios" I get this error:

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)

I already tried:

1) ionic platform rm ios 2) ionic platform add ios

Would appreciate some advice. Thanks!

Upvotes: 3

Views: 1499

Answers (2)

veerababu
veerababu

Reputation: 201

If you run this command:

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

Upvotes: 5

littlequest
littlequest

Reputation: 329

I figured out my problem. When you download Xcode 8 beta, it's called "Xcode-beta." I dragged it into Applications and simply deleted the old Xcode. You actually need to re-name the "Xcode-beta" app to "Xcode" for Ionic to recognise it.

Upvotes: 3

Related Questions