Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why i am getting "command failed with exit code ENOENT" when adding ios in cordova?

Tags:

ios

cordova

I am creating one cross platform app in cordova i am getting below error:

Creating ios project...
Error: C:\Users\Jay\.cordova\lib\ios\cordova\3.4.1\bin\create: Command failed wi
th exit code ENOENT
    at ChildProcess.whenDone (C:\Users\Jay\AppData\Roaming\npm\node_modules\cord
ova\src\superspawn.js:126:23)
    at ChildProcess.EventEmitter.emit (events.js:95:17)
    at Process.ChildProcess._handle.onexit (child_process.js:795:12)
like image 837
Jay Joshi Avatar asked May 12 '14 09:05

Jay Joshi


1 Answers

You can't add the ios platform to your cordova project from an OS other than Mac OS X.

It's because cordova needs XCode to be present so it can create an XCode project with which it will build the ios binaries.

See the official documentation here.

Relevant part :

Apple® tools required to build iOS applications run only on the OS X operating system on Intel-based Macs. Xcode® 6.0 (the minimum required version) runs only on OS X version 10.9 (Mavericks) or greater, and includes the iOS 8 SDK (Software Development Kit). To submit apps to the Apple App Store℠ requires the latest versions of the Apple tools.

like image 80
Mohamed AMAZIRH Avatar answered Nov 09 '22 23:11

Mohamed AMAZIRH