All three user flows are implemented. User Flow 1: Real-Time Feedback can be triggered after pressing the “START” button on the main page. User Flow 2: Cumulative Summary can be triggered after pressing the “SUMMARY” button on the main page. User Flow 3: Self-update based on weather & road conditions, is currently triggered by pressing the weather buttons after starting the trip. Bumpy Road can be detected with a gyroscope, and the dedicated screen can be activated.
The front end design was first sketched out with paper and pen during discussion sessions, then refined with Figma (a helpful website that allowed us to map out simple causal relationships between different pages within the application). The final implementation was done in Xcode, using the storyboard panel to set up button listener functions, layout constraints, and pop-up modes.
With Xcode, back-end development was an integral part of front-end development: each front-end View was paired with a ViewController file. The most unique part of the back-end was the detection of front and back tilt, where we made use of the gyrometer input supplied by Apple’s CoreMotion library. In detail: clicking the “start driving” button will activate a ScheduledTimer (Swift’s default timer utility) , which on each tick (10 ticks per second), retrieves the current rotation rate of the x-axis (as a float number) from the device’s gyrometer. This number is then compared with predefined values to determine if there is an ongoing tilt action.
When implementing the adding weekly report function, those information typed should be added to CoreData in order to be stored and accessed later. When implementing the showing detail view controller, the stored data in CoreData should be fetched. When clicking the link in the detailed View Controller, users will be directed to web pages using XCode WebKit packages.
The calendar View Controller in summary consists of many buttons and shows saving information by fetching all the data from the database.