Building a Cordova development environment
1. Installing the node. JS Environment
Official website: http://nodejs.org/Download Package Installation
2. Install Cordova using the command line
Main command: sudo npm install-g Cordova
Official website: http://cordova.apache.org
3. Create a new project
Command line: Cordova Create Hello Com.mydomain.hello HelloWorld (-D)
The first parameter is the file directory, the second parameter is the app ID, the third parameter is the title of the display, and-D is the ability to output information in the process.
There is a "www" directory under the Hello directory, which will be the Hompage directory for your application.
4. Install the Platform module for the project, which only adds iOS
CD Hello
Cordova Platform Add iOS
Run the following command build project
Cordova Build
5. Install the required extensions, for example, to install the in-app payment module
Document: Https://github.com/j3k0/cordova-plugin-purchase/wiki/Setup
Command:
Cordova Plugin Add Https://github.com/j3k0/cordova-plugin-purchase.git
6. Double-click Helloworld.xcodeproj to open the Xcode development environment
Xcodeproj Project's file location: hello/platform/ios/
Cordova Development under MAC