PhoneGap in 60 Seconds June 2nd, 2014

  1. Install Node.js
  2. Open Terminal and install PhoneGap followed by Cordova…
    $ sudo npm install -g phonegap
    $ sudo npm install -g cordova
  3. Install SDK’s for targeted environments

Create a New Project

In Terminal, navigate to where you want to create the new project directory, and then run Cordova’s create command, passing in 1) The directory name for the project, 2) a reverse domain-style identifier, and 3) the app’s display title.

$ cordova create PROJECT com.example.PROJECT TaylorsWorld

Add Platforms, Build, and Test

See the PhoneGap documentation for the full command line interface, but the basics go like this…

$ cd PROJECT
$ cordova platform add ios
$ cordova build
$ cordova emulate ios

Note: I’m having a bug in my Xcode’s iOS Simulator where I’m having to “Reset Content and Settings…” (seems to be a common bug and nothing to do with PhoneGap)

Add Plugins

$ cordova plugin list
$ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
$ cordova plugin remove org.apache.cordova.device (plugins are on a per-project basis so remove any unused ones when ready to deploy)