Skip to content

Latest commit

 

History

History
67 lines (46 loc) · 2.2 KB

README.md

File metadata and controls

67 lines (46 loc) · 2.2 KB

Sensorweb Client

Contributing

This app uses the following technologies; familiarity is likely required:

  • Cordova — a native app wrapper
  • TypeScript — type safety, preventing common errors
  • React — view rendering
  • MobX — state management
  • Webpack — building and compilation

Files are organized as follows:

  • src/ contains the main app sources.
    • Most files have the .tsx extension (TypeScript with JSX).
  • www/ is autogenerated and should not be modified directly.
    • During compilation, webpack takes files from src/ and copies needed files here.
  • plugins/ and platforms/ are installed by Cordova when running cordova prepare. They should not be checked in.

When making code changes, you can execute npm run watch, which will incrementally build the app as changes are made. You can serve the www/ folder directly (e.g. with node's http-server or similar) and test most features in the browser. We try to support and shim any necessary native APIs to enable in-browser testing.

It is recommended that you use an IDE that supports TypeScript, such as Visual Studio Code. This makes development much easier, as errors, type definitions, and refactoring support are all provided inline.

Installation

Prerequisites:

  1. Install node and npm.
  2. Install cordova: sudo npm install -g cordova
  3. Install dependencies: npm install
  4. Run npm run build.

Running on iOS

  • Requires Xcode
  • cordova platform add ios (the first time)
  • cordova build ios
  • Install the app with Xcode or try cordova run ios --device

Running on Android

  • cordova platform add android (the first time)
  • cordova build android
  • cordova run android --device

Polish

To generate the icons and splash screen (after setup steps noted above):

  • brew install imagemagick (Mac)
  • ./generate-icons.sh

Targeted Device Support

  • iOS 9+ (iOS 8 has poor support for FlexBox, < 8% using iOS 8 as of 2016-10)
  • Android 5+

Notes:

  • No Compass Support: Samsung Galaxy J7, iPod Touch