How to Setup Phonegap/CordovaMobile app development
- To install Cordova, the node must be there in your local machine.
- To install Cordova, you need to run this command: npm install –g Cordova
- Now next step is to create blank Cordova project to your local directory.
- To create the blank project you need to run this command: cordova create <path>
- It will create the blank project for you and the next step is to add platforms into it.
- Next step is to add platforms into the project, to test application in the browser you must add web platform: Cordova platform add browser
- Cordova provides different platforms to allow it run into different devices like android, ios, WebOS, blackberry.
- Let’s assume we are adding android and ios platforms into the project, then you must set basic configuration into XML files like android and ios tag must be there in the config file.
- Cordova most important part is plugins
- If you want the user to allow to access native functionality access, you must install the plugin and its configuration.
- You can install the plugin by this command: cordova plugin add <plugin name>@version (default latest)
- To remove any plugin use this command: cordova plugin rm <plugin name>
Posted on August 13, 2018 by Keyur Patel