Skip to content

Frontend for NUWM timetable iOS/Android application

License

Notifications You must be signed in to change notification settings

dooptha/nuwm-frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NUWM Frontend

This is open source React Native application designed for students by students of the NATIONAL UNIVERSITY OF WATER AND ENVIRONMENTAL ENGINEERING.

Get it on Google Play

Build Status Maintainability Test Coverage License

Dependencies

  • Node.js (v11.14.0) and NPM (v6.7.0)
  • XCode (v10.3)

Build

IOS

TBD

Android

RIP

To build development version *.apk use this command:

$ cd android && ./gradlew assembleRelease

To build production version use this instruction.

$ cd android && ./gradlew bundleRelease -PkeyPassword=<password> -PstorePassword=<password>

Configuration

You can configure app by using configuration files in /config directory. In development environment production.js will be overwritten by development.js.

Also you can create override.js file in /config directory. It will override configuration in development.js.

override.js is ignored by git, so it is perfect for local changes, like CUSTOM_INITIAL_ROUTE, and you won't accidentally push your custom config to remote repository.

In production environment override.js and development.js will be ignored.

If you have any error related to override.js, restarting metro bundler, or creating override.js file (if you haven't done this yet) can solve that error.

Debugging

RN have a lot of tools for development purposes, more info you can find here.

Below, are some basic things.

Developer Menu
IOS
  • Physical: Shake your device
  • Simulator: Press ⌘ + D
  • Additional: All is working out of the box
Android
  • Physical:
$ adb shell input keyevent 82
  • Simulator: Press ⌘ + M / Ctrl + M

  • Additional:

After RN version >=0.60, there is automatic :8081 port forwarding for Metro Project Bundler (sometimes it doesn't work 😅), but for our backend you should forward additional port by default it's :3000

$ adb -s <device name from "adb devices"> reverse tcp:3000 tcp:3000

IMPORTANT: For connecting to a local server from Emulator device use http://10.0.2.2:3000 (More info)