4
votes

I got my error when I tried to build my first iOS Cordova App. By using this command :

sudo cordova build ios --device

Here what my terminal output:

CordovaError: Promise rejected with non-error: 'xcode-select: error: tool \'xcodebuild\' requires Xcode, but active developer directory \'/Library/Developer/CommandLineTools\' is a command line tools instance\n' at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15) at process._tickCallback (internal/process/next_tick.js:68:7)

What this is error is all about? How do I solve it?

Thank you very much! Regards,

Daksamedia

1

1 Answers

27
votes

I had similar issue when running ionic cordova build ios --prod. Well to solve this issue there some stuffs have to check:

First make sure you have Xcode Installed with command line tools also If you have Xcode installed already check the version and your mac version to download the right command line tools. Download the command line tools here Command Line Tools After install it and run this command to fix the xcode-select path

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

After this run the command again. Am sure this will work for you