Tour-de-Force / btc-app

The Bicycle Touring Companion App
1 stars 2 forks source link

Bicycle Touring Companion - Client App

Bicycle Touring Companion uses React and Cordova to build a native android application.

Have npm installed on your development machine (available when installing node).

Run npm install

Android

Running on Android

Minimum SDK 19 (Android 4.4)

  1. Install Android Studio

Simulator

  1. npm run start:android-sim (this build will respect your NODE_ENV for selecting the servers, localhost by default)
  2. You can inspect the Android view by going to chrome://inspect
  3. Repeat from step 2 to build again

Device

  1. Make sure your device shows up on adb devices
  2. npm run start:android-device (this build will point to AWS)
  3. You can inspect the Android view by going to chrome://inspect
  4. Repeat from step 3 to build again

iOS

Running on iOS

Minimum iOS 9.0

  1. Install Xcode on your Mac

Simulator

  1. npm run start:ios-sim (this build will respect your NODE_ENV for selecting the servers, localhost by default)
  2. You can inspect the iOS view by using Safari remote debugging on your Mac
  3. Repeat from step 2 to build again

Device

  1. Open platforms/iOS/BTC.xcodeproj
  2. Set the project to use your code signing credentials
  3. npm run start:ios-device (this build will point to AWS)
  4. You can inspect the iOS view by using Safari remote debugging on your Mac
  5. Repeat from step 4 to build again

Browser

Developing in Browser

  1. npm run dev (this build will respect your NODE_ENV for selecting the servers, localhost by default)
  2. Open http://localhost:8000/browser/www/
  3. The Chrome extension LiveReload your browser session will reload when you update a file. (not required, but nice)

Deploying for Web

  1. Set your NODE_ENV environment variable to production if you want the build to point to AWS
  2. npm run dev (you can stop the local server once it starts)
  3. Copy contents of platforms/browser/www to your web server's documents directory (all served files are static)
  4. The web server document directory is the btc-app-web bucket on AWS.
  5. Set all the files in this directory to world readable.
  6. If you want the website to update faster, run an invalidation on /* in CloudFront.

Look at the package.json for other commands!

Other Information