diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 54 |
1 files changed, 47 insertions, 7 deletions
@@ -21,17 +21,57 @@ To get it up and running you will need to create a config.js file in src/js/ bas on the src/js/config-example.js file. This has configuration for which FMS instance to use etc. -You should then be able to build and run it like any other PhoneGap project. +Setup +----- +This project uses Apache Cordova to produce Android and iOS apps. There is +some mildly complicated configuration and setup required to be able to develop +with it. The following all assumes you're working on a Mac. -The platform specific cordova.js files are inside the projects and then the src directory -is included inside the www folders for each platform. On Android this is done with a -symbolic link, on iOS by a build script. +1. Make sure you have the latest versions of XCode, the Android SDK, node and +npm installed. It's a very good idea to have installed the Intel HAXM versions +of the Android emulator because they're about 100 times faster to run. You need +to download it from the Android SDK Manager (run `android` on the command line) +and then actually run the `.dmg` that this creates in your sdk folder. + +2. Install the cordova CLI with npm: `npm install -g cordova` +Note that this is not the same as the phonegap CLI and the two should not be +mixed up. The latter gives you access to Adobe's proprietary phonegap build +service, which we **don't** use! + +3. Checkout the project + +4. `cd` into the project directory and install the Cordova platforms you need: +`cordova platform add android` and `cordova platform add ios` + +5. Add the cordova plugins we use. As of writing the list is: (from `cordova plugin list`) + + ``` + org.apache.cordova.camera 0.3.2 "Camera" + org.apache.cordova.device 0.2.12 "Device" + org.apache.cordova.file 1.3.1 "File" + org.apache.cordova.file-transfer 0.4.6 "File Transfer" + org.apache.cordova.geolocation 0.3.10 "Geolocation" + org.apache.cordova.network-information 0.2.12 "Network Information" + org.apache.cordova.splashscreen 0.3.3 "Splashscreen" + ``` + + So to install them: `cordova plugin install org.apache.cordova.camera org.apache.cordova.device org.apache.cordova.file org.apache.cordova.file-transfer org.apache.cordova.geolocation org.apache.cordova.network-information org.apache.cordova.splashscreen` + +6. Copy `www/js/config.js-example to www/js/config.js` and edit if needed + +7. To run the project on one of the platforms, use: `cordova emulate ios` or `cordova emulate android` +(You might need to `npm install -g ios-sim` to run it on ios) + +You should then be able to build and run it like any other Cordova project. + +- The `platforms`, `plugins` and `hooks` folders are auto-generated by Cordova +no need to check them in (hence why they're .gitignored), you should only need +to check in the `www` folder and `config.xml`, plus possibly `/merges` if you +ever use that functionality. Basic structure --------------- -* Android - android project -* iPhone - iOS version -* src - JS, HTML, CSS and image files +* www - JS, HTML, CSS and image files * templates - templates with strings to be translated * locale - gettext translation files * bin - helper scripts for translation |