Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 430
Daksa Media Avatar asked Nov 28 '22 13:11

Daksa Media


1 Answers

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

like image 50
Code Mickey Avatar answered Dec 06 '22 01:12

Code Mickey