Ionic build iOS throw errors


#1

I have got the following error when use ionic build iOS command:

Mac-Admin:media admin$ ionic build ios
Running command: /Users/admin/Documents/nodejs/media/hooks/after_prepare/010_add_platform_class.js /Users/admin/Documents/nodejs/media
add to body class: platform-ios
Running command: /Users/admin/Documents/nodejs/media/platforms/ios/cordova/build 
xcrun: error: active developer path ("/Volumes/Xcode/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`)

ERROR building one of the platforms: Error: /Users/admin/Documents/nodejs/media/platforms/ios/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /Users/admin/Documents/nodejs/media/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:134:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

How can I fix it?


#2

This thread may help: https://github.com/driftyco/ionic-cli/issues/282