SlideShare a Scribd company logo
PhoneGap Command Line
Anuchit Chalothorn
anuchit@redlinesoft.net
Tools
● Node JS
● Apache Ant
● SDK
○ XCode for iOS App
○ Android SDK for Android App
Install Node.js
Download and install Node.js from
http://nodejs.org/download/
Install Apache Ant
Download and install Apache Ant from
https://ant.apache.org/bindownload.cgi

*** Mac user, use brew to install ant ; brew install ant
Install PhoneGap
Install PhoneGap by using Node Package
Manager
sudo npm install -g phonegap

* Windows user use : npm install -g phonegap
Create New Project
Use PhoneGap command line to create new
project eg; HelloWorld. then dev your code in
www directory.

phonegap HelloWorld com.example.helloworld
Install PhoneGap plugins
Use PhoneGap command line to install plugins
phonegap plugin add <url-plugin>

* List of plugins : https://build.phonegap.com/plugins
Build Project to Mobile App
Use PhoneGap command line to build project
to Mobile Application, after build you’ll get
native application in platforms directory
phonegap build android

* Change android to another platform eg: ios
Run Project on Device / Emulator
Use PhoneGap command line to run project on
your device
phonegap run android

* Change android to another platform eg: ios
Using PhoneGap Command Line

More Related Content

Using PhoneGap Command Line

  • 1. PhoneGap Command Line Anuchit Chalothorn anuchit@redlinesoft.net
  • 2. Tools ● Node JS ● Apache Ant ● SDK ○ XCode for iOS App ○ Android SDK for Android App
  • 3. Install Node.js Download and install Node.js from http://nodejs.org/download/
  • 4. Install Apache Ant Download and install Apache Ant from https://ant.apache.org/bindownload.cgi *** Mac user, use brew to install ant ; brew install ant
  • 5. Install PhoneGap Install PhoneGap by using Node Package Manager sudo npm install -g phonegap * Windows user use : npm install -g phonegap
  • 6. Create New Project Use PhoneGap command line to create new project eg; HelloWorld. then dev your code in www directory. phonegap HelloWorld com.example.helloworld
  • 7. Install PhoneGap plugins Use PhoneGap command line to install plugins phonegap plugin add <url-plugin> * List of plugins : https://build.phonegap.com/plugins
  • 8. Build Project to Mobile App Use PhoneGap command line to build project to Mobile Application, after build you’ll get native application in platforms directory phonegap build android * Change android to another platform eg: ios
  • 9. Run Project on Device / Emulator Use PhoneGap command line to run project on your device phonegap run android * Change android to another platform eg: ios