Skip to content

Instantly share code, notes, and snippets.

@alemohamad
Last active August 29, 2015 14:16
Show Gist options
  • Save alemohamad/78d11449b54ec9ab82d8 to your computer and use it in GitHub Desktop.
Save alemohamad/78d11449b54ec9ab82d8 to your computer and use it in GitHub Desktop.

PhoneGap CLI

# install
$ sudo npm install -g phonegap
$ phonegap -v

# create app
$ phonegap create myApp com.lynda.phonegapdemo Demo

# build the app in local machine
$ phonegap build android
$ phonegap build ios

# testing in real devices
$ phonegap install android
$ phonegap install ios

# if there's an error with ios
$ sudo npm install -g ios-deploy
$ sudo npm install -g ios-sim

# testing in simulator devices
$ phonegap install -e android
$ phonegap install -e ios

# how to add a plugin
$ phonegap plugin add org.apache.cordova.device
$ phonegap plugin add <github url for 3rd party plugin>
$ phonegap plugin list
$ phonegap plugin remove <url or identifier>

# using phonegap build to compile
$ phonegap remote login -u <adobe_id> -p <adobe_id_password>
$ phonegap remote build <os_platform>

# using phonegap developer app
$ phonegap serve

Cordova CLI

# install
$ sudo npm install -g cordova
$ cordova -v

# create app
$ cordova create myApp com.lynda.phonegapdemo Demo

# create the app assets in each platform
$ cordova platform add android
$ cordova platform add ios

# build the app in local machine
$ cordova build
$ cordova build android
$ cordova build ios

# remove platform for development
$ cordova platform remove android
$ cordova platform remove ios

# testing in real devices
$ cordova run android
$ cordova run ios

# testing in simulator devices
$ cordova emulate android
$ cordova emulate ios

# how to add a plugin
$ cordova plugin add org.apache.cordova.device
$ cordova plugin add <github url for 3rd party plugin>
$ cordova plugin remove <url or identifier>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment