A cordova project using jQuery Mobile suitable for starting a new app. Learn how this template works on http://app-o-mat.com
A working cordova toolchain with your platforms set up. See http://cordova.apache.org for installation instructions
This template includes all dependencies in www/lib
. They are:
- jQuery from http://jquery.com
- jQuery Mobile from http://jquerymobile.com
- jQuery Mobile Router from https://github.com/azicchetti/jquerymobile-router
- Handlebars from http://handlebarsjs.com
- FastClick from https://github.com/ftlabs/fastclick
-
Create your cordova app normally
cordova create yourapp com.example.yourapp 'Your App' cd yourapp # recommended minimal plugins cordova plugin add org.apache.cordova.console cordova plugin add org.apache.cordova.dialogs cordova plugin add org.apache.cordova.splashscreen cordova plugin add org.apache.cordova.statusbar # add platforms cordova platform add ios cordova platform add android
-
Copy the
www
subdirectory from this project, overwriting the default one -
Edit
www/config.xml
(follow the comments). Match widget id to the one incordova create
. [Note: for Cordova 3.5, theconfig.xml
was moved from www to the root of the project. In 3.5, move the one fromwww
over the one in the project root, and then edit it there] -
Run the app
# In a browser cordova serve # Then, navigate to http://localhost:8000/ios/www/ (replace `ios` with any platform you installed) # In an emulator (replace `ios` with an installed platform) cordova emulate ios # On the device (replace `ios` with an installed platform) cordova build ios cordova run ios