Currently the latest version of Cordova is 5.1.1, and the steps to build a development environment under Mac are as follows:
1) First install the NODEJS environment
Access official website: http://nodejs.org/, current version: v0.12.7
Click "Install", will download the Mac's installation package, double-click the installation.
2) Enter the terminal command line, using NPM to install Cordova, the command is as follows:
$ sudo npm install - G Cordova
3) Create a new PhoneGap project with the following command:
$ Cordova Create test cn.com. Test Test
After running this command, the Cordova program will help you create the test folder, which is the PHONEGAP environment where the project name is test.
4) Enter the test folder with the following command:
$ cd Hello
5) Add iOS platform, command as follows:
$ Cordova Platform Add iOS
6) You can also add the required Cordova plug-in to the device plug-in as an example:
$ Cordova Plugin Add Cordova-plugin-device
7) Double-click Test.xcodeproj to open the Cordova development environment via Xcode
8) Develop Cordova applications.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Configuring PhoneGap (Cordova) 5.1.1 development environment under Mac