Once you have finished installing the individual platforms, it's time to move on to the command-line interface. This section contains the most important commands for the command-line interface. To start off, you need to install Node.js (www.nodejs.org). Once you have installed node.js
, perform the following steps:
Run the
npm –g install cordova
command. This installs the command-line interface on your computer.Change the directory to the place where you will be saving your project files for this chapter.
Once in the directory, issue the
cordova create todo com.project.todo ToDo
command. This will create a folder containing your basic files for PhoneGap.Now, change directory to
/todo
.Once in the directory, we need to install the various platforms we will be supporting:
For iOS, use the
cordova platform add ios
commandFor Android, use the
cordova platform add android
command
Now, let's try to run the Hello World example in Android using the
cordova...