iOS Application

Health Tracking Application

A teal background and two screenshots of the health tracking application with a primarily teal colorscheme. The exercises screen with two graphs of exercise data (daily duration and heart rate for each exercise datapoint) is shown once in light mode and portrait orientation and once in dark mode and landscape orientation.

About the Application

Basics

Description

An iOS application designed to keep track of the user's health information over time.

It stores the user's health data and allows the user to access, modify and export it with the application GUI. Health data is received from devices such as heart rate monitors or entered by the user.

The application is designed around four main tabs: Medications, Symptoms, Statistics, and Exercises.

Technology Used

  • Swift
  • SwiftUI
  • SwiftData
  • Swift Testing
  • XCTest

Interesting Features

Interactive Annotations

The graphs allow the user to hold their finger over them and generate an interactive annotation at the nearest datapoint.

The symptom view showing an annotation by one of the symptom datapoints. It lists the exact time and value. The symptom view showing an annotation by one of the symptom datapoints. It lists the exact time and value.

Settings Menu

The application keeps track of user settings. The user can choose to hide any of the tabs or statistics if they do not find them to be helpful.

The settings view showing toggles for the tabs and the specific statistics The settings view showing toggles for the tabs and the specific statistics. The statistics tab toggle is off so the specific statistics toggles are disabled and the statistics tab is not visible on the tab bar.

Exports

The application allows the user to export their data as either a CSV or a PDF. The user can choose which tabs' data they wish to include in the export.

The export view with the iOS export popup. The export view with the iOS export popup.

Software Development Life Cycle

Phases

Planning

  • I found that the interface and capabilities within most health tracking applications do not meet my needs
  • A very important feature which is often limited or omitted is being able to export the health data, in order to share it with doctors among other things
  • While being able to input your own data is nice and often necessary, it is also important that much of the data is imported automatically from health devices
A diagram showing the flow of data to the iOS Application. It shows a selection of health devices that automatically send their data to the apple health store. The iOS application then pulls that data in order to generate the graphs and exports.
A diagram showing the flow of data to and from the iOS Application

Design

  • The application follows the Model-View-ViewModel software architecture pattern for the interfaces between the graphical user interface and the data
  • Database access is controlled and kept thread safe through the use of the singleton software design pattern
  • Design features and tasks are tracked using Atlassian's Jira

Development

  • The programming language is Swift using frameworks including SwiftUI, SwiftData, and HealthKit
  • The integrated development environment is XCode running on a Mac
  • The version control system is Git using GitHub in a private repository

Testing

  • Automated tests are developed simultaneuously with the code in order to ascertain that the features maintain functionality during further development
  • Unit tests are developed using Swift Testing for the backend software components, particularly the Models and View-Models
  • UI tests are developed using XCTest for the frontend software components, particularly the Views
A screenshot showing the application's 95% automated test coverage in XCode.
A screenshot showing the application's 95% automated test coverage in XCode

User Interface Design

Application Flow

The Main Tabs

Medications Tab
  • Medications View

    Upon first opening the application the user is presented with three tabs, the first of which is Medications.

    The medications view showing a list of the users medications
  • Medication Details

    Upon tapping one of the medications in the list, the user is presented with a medication detail screen.

    The medication detail view showing the selected medication. It has fields for the medication name, dosage and description. It also has a picker which allows the user to selected how the medication is scheduled and allows the user to log when they take the medication.
Symptoms Tab
  • Symptoms View

    Upon first opening the application the user is presented with three tabs, the second of which is Symptoms.

    The symptoms view showing a list of the users symptoms
  • Symptom Details

    Upon tapping one of the symptoms in the list, the user is presented with a symptom detail screen.

    The symptom detail view showing the selected symptom. It has fields for the symptom name, and description. It also has a graph showing the users symptom datapoints over the last week or month.
Statistics Tab
  • Statistics View

    Upon first opening the application the user is presented with three tabs, the third of which is Statistics.

    The statistics view showing graphs of various health details including blood pressure, maximum heart rate and body mass.
  • Monthly Charts

    Each of the graphs can be viewed for the past week or the past month.

    The statistics view showing month long graphs of various health details including blood pressure, maximum heart rate and body mass.
Exercise Tab
  • Exercises View

    Upon first opening the application the user is presented with three tabs, the last of which is Exercises.

    The exercises view showing graphs of the users recent exercise datapoints.
  • Exercise Details

    Upon tapping one of the exercises datapoints in the list, the user is presented with an exercise datapoint screen.

    The exercise detail view showing the selected exercise datapoint. it has fields for the exercise type, date, duration, max heart rate, average heart rate and any notes.

Different Viewing Modes

The application is designed in order to be viewed both landscape and portrait as well as in both light mode and dark mode.

Exercises Tab

  • Light Mode
    Portrait Orientation
    The exercises tab viewed in portrait orientation and light mode.
  • Dark Mode
    Portrait Orientation
    The exercises tab viewed in portrait orientation and dark mode.
  • Dark Mode
    Landscape Orientation
    The exercises tab viewed in landscape orientation and dark mode.

Medications Tab

  • Light Mode
    Portrait Orientation
    The Medications tab viewed in portrait orientation and light mode.
  • Dark Mode
    Portrait Orientation
    The Medications tab viewed in portrait orientation and dark mode.
  • Dark Mode
    Landscape Orientation
    The Medications tab viewed in landscape orientation and dark mode.

Symptom Detail View

  • Light Mode
    Portrait Orientation
    The symptom detail screen viewed in portrait orientation and light mode.
  • Dark Mode
    Portrait Orientation
    The symptom detail screen viewed in portrait orientation and dark mode.
  • Dark Mode
    Landscape Orientation
    The symptom detail screen viewed in landscape orientation and dark mode.