/jqm-cordova-template-project

A cordova project using jQuery Mobile suitable for starting a new app

Primary LanguageJavaScriptMIT LicenseMIT

jqm-cordova-template-project

A cordova project using jQuery Mobile suitable for starting a new app. Learn how this template works on http://app-o-mat.com

Pre-requisites

A working cordova toolchain with your platforms set up. See http://cordova.apache.org for installation instructions

Dependencies

This template includes all dependencies in www/lib. They are:

Instructions

  1. 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
  2. Copy the www subdirectory from this project, overwriting the default one

  3. Edit www/config.xml (follow the comments). Match widget id to the one in cordova create. [Note: for Cordova 3.5, the config.xml was moved from www to the root of the project. In 3.5, move the one from www over the one in the project root, and then edit it there]

  4. 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