sudo npm install -g cordova
There are two ways to download Xcode:
from the App Store, available by searching for "Xcode" in the App Store application.
from Apple Developer Downloads, which requires registration as an Apple Developer.
Once Xcode is installed, several command-line tools need to be enabled for Cordova to run. From the command line, run:
$ xcode-select --install
The ios-sim and ios-deploy tools - allows you to launch iOS apps into the iOS Simulator and iOS Device from the command-line.
To install them, run the following from command-line terminal:
$ npm install -g ios-sim
$ npm install -g ios-deploy --unsafe-perm=true --allow-root
(需要加上后面这两个参数才能够正常安装 )

到此 ios 的cordova 环境搭建完成。
原文:http://www.cnblogs.com/Purk/p/5664917.html