The official app of the Pioneer Valley Transit Authority (PVTA)!
Current release available at m.pvta.com, the Play Store, and the App Store.
The app is a hybrid that uses Ionic 2+.
All data is live, and comes from endpoints documented here.
To begin developing, follow these steps:
-
Ionic and Cordova CLIs:
npm install -g cordova@^7.0.1 ionic@^3.7.0
Note the explicit versions. Using versions other than the ones specified can cause local problems and Travis failures.
-
To develop and test on Android, you need the prerequisites for the [Cordova Android platform][cordova-android] installed. You must also create an Android Virtual Device.
-
To develop and test on iOS, you need the prerequisites for the Cordova iOS platform installed.
- Clone repository, cd into it.
- Run
npm install
The app's source code is in the src
directory, and consists of Typescript,
HTML, and SCSS. Start editing away!
-
Viewing the results of your changes is easy:
Just run
ionic serve -c
from the root directory. Ionic will open your default browser and navigate to itself for you. -
We encourage PRs! Add unit tests for your code and run
npm test
before opening one, please!
The project has been configured to be an Android and iOS project. You have 3 options for testing the native app:
-
ionic cordova build [ios OR android]
generates necessary files (.apk
or.app
) to run on a device, but does nothing more. -
ionic cordova emulate [ios OR android]
builds the app, opens an emulator, and starts the app for you. -
ionic cordova run [ios OR android]
builds the app and installs it on your USB-connected phone (and opens an emulator if no phone is connected). For iPhones, this only works on iOS >= 10, and requires special configuration (see ionic's docs).
This project was started years ago to learn about mobile development and JavaScript frameworks, and to provide PVTA's passengers with a mobile app to retrieve realtime information. Since then, PVTA's vendor has released two major revisions, overhauling and significantly improving its realtime mobile app, and PVTA’s information has also started appearing in TransitApp.