简体   繁体   中英

Ionic error when trying to add ios to project

When trying to add ios to my project by running:

ionic platform add ios

in the root of my project directory, I get the following error:

Deans-Air:myApp dean$ ionic platform add ios Creating ios project... xcrun: error: active developer path ("/Applications/Xcode6-Beta.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 ) Cordova can only run in Xcode version 4.6 or greater. Error: /Users/dean/.cordova/lib/npm_cache/cordova-ios/3.6.3/package/bin/create: Command failed with exit code 2 at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:753:16) at Process.ChildProcess._handle.onexit (child_process.js:820:5)

This is the first time I'm trying to create an ionic application. Any help would greatly be appreciated!

You probably updated the Beta of Xcode by downloading it from the Apple developer site after installing from the App Store. The fix is in the error message, but you have to update the Xcode system path to the current Xcode version. I installed Xcode-Beta recently and had to do the same thing by navigating to my Applications folder and seeing what the exact name of the Xcode app was, then running the command with the updated path.

xcode-select --switch /Applications/Xcode-Beta.app

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM