Phonegap is an open source framework that provides us to build mobile applications. It uses some web APIs for the different platforms like android, ios, windows, blackberry. We can add the specific platform in which we want to run the mobile application.
1. First thing you should do is to install cordova on your system by running the following command.
$ npm install cordova -g
When the cordova is installed you need to go to your project folder and run the following command.
$cordova create cordova-app com.my.app MyAPP
Then go to the folder that contains cordova by following.
$ cd cordova-app
Now you need to add the platforms whatever you want like.
$ cordova platform add ios
2. Now we can work on our application source code that is inside www folder inside cordova-app folder. Before starting changes
in the app we need to include cordova library in html file.
<script src ="cordova.js"></script>
Now we need to add some script file to listen to the event deviceready. It intialises the application and the plugins to use.
3. After all the above steps we can run the project by following command.