aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2014-10-03 15:07:08 +0100
committerDave Arter <davea@mysociety.org>2015-08-28 14:27:15 +0100
commita69d425c0e5c004145ac1ab70e2f7f9fc329b54c (patch)
tree8eb7ff0ff7aaa0fce8bc7214ec6e15b694fddbdc /README.md
parent8fd15b58733c51d7f001f9eac66b7d03830ec0b4 (diff)
update Android to Cordova 3.6
Required due to security issue Remove Android directory as no longer required, move src -> www to match standard layout, update .gitignore to avoid including the standard platform files, update README based on Steve's zurich one
Diffstat (limited to 'README.md')
-rw-r--r--README.md54
1 files changed, 47 insertions, 7 deletions
diff --git a/README.md b/README.md
index e5ee416..d5b7679 100644
--- a/README.md
+++ b/README.md
@@ -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