A template to be used as a starting point for hybrid applications using Phonegap, built upon the yeoman cordova scaffold.
This template follows the structure and style used in applications such as Sensing Evolution and the University Museums App
- Backbone
- LayoutManager
- Handlebars templating
- Grunt task runner
- Sass for styling
- JQuery
- RequireJS module management
- Jasmine testing
bower: run npm install -g bower
Xcode and an Apple Developer Program account
Clone the project:
git clone https://github.com/ox-it/phonegap-app-template
cd phonegap-app-template
install dependencies:
npm install
bower install
initialise cordova:
cordova setup
This grunt command adds all platforms and plugins listed in the arrays in Gruntfile.js
Build & run on device or emulator with the following grunt tasks
grunt ios
grunt ios-sim
grunt android
grunt android-sim
Start hot-code-push server and build & run on device (using the hot-code-push plugin) with the following grunt tasks
grunt devel:android
grunt devel:ios
The app can be deployed to additional devices without restarting the hot-code-push server with the following grunt tasks
grunt develrun:android
grunt develrun:ios
A project can opt out of the hot-code-push if the plugins are uninstalled `` cordova plugin remove cordova-hot-code-push --save cordova plugin remove cordova-hot-code-push-local-dev-addon --save
## Customising
Duplicate and modify the example Model, Collection, View, Template and Router.
#### Adding plugins
Add cordova plugins using --save flag:
cordova plugin add cordova-plugin-device --save