Daksa Media
Daksa Media

Reputation: 83

CORDOVA IOS - Error Promise Rejected when I build

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

Upvotes: 5

Views: 6543

Answers (2)

Binary_Hits00
Binary_Hits00

Reputation: 1451

if you're facing this error and you installed XCode already, All you have to do is to...

  • Open XCode
  • Go To Xcode > Preferences > Locations
  • From the Command Line Tools Select your XCode enter image description here

Upvotes: 1

Code Mickey
Code Mickey

Reputation: 957

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

Upvotes: 28

Related Questions