IOS Workout Application

Published on: 15 February 2024 - Carlos Bilbao

Introduction

The IOS Workout Application was developed for a university assignment for the subject Mobile Application Development, this subject looked at the development of Android and IOS applications, and the IOS application was designed with Xcode. The Application aims to provide the user with a means of storing workout data for past and future workouts. The application allows the user to enter exercises of different categories, the user then can schedule a workout with selected exercises of their choice for the coming days and they can add that workout to the IOS built-in calendar. When the scheduled workout day arrives, the user can head to the log workout page and the previously selected exercises for that day will appear, the user can then add the reps, sets and weights of all these exercises in the workout with the assistance of the rest timer. After a workout has been logged then the user can view these workouts by navigating to the display logs page. The video demonstration is presented to the right.

Key Technologies

The application is assisted by the storage and retrieval of data through the use of the integrated database Core Data. I created a relational database with several “Entities” in the Core Data folder, I have drawn a diagram in the section to represent the relational database. I utilised a cocoa-touch class I made called DatabaseManager to access data when needed by accessing the methods in the ViewController classes, these ViewController classes were responsible for the input and output for each page in the application. To create consistent styling for each ViewController I created a class called BaseController which would extend the ViewControllers, to create consistent styling most notably, the blue gradient background and logo. This was of course assisted by the visual drag-and-drop environment that Xcode provides for the design of the GUI. The logic was created using Swift and some Objective-C where necessary. To the left I have provided one of the methods in DatabaseManager which takes a workoutID and returns all of the associated exercises and performed sets, reps and weights as an array for the display logs page.

Database Design

The Database was made with the assistance of Core Data, the database manager that comes with Xcode and IOS applications. Core Data refers to tables as entities and column headings as attributes. Before I started any coding, I designed the database through a database schema followed by the development of the database and then the development of the DatabaseManager class. There were three main tables, Exercises, ScheduledWorkout and Workouts. Between these tables, there are many to many relationships, where multiple exercises appear in a workout and multiple workouts have the same exercise, the same situation exists for the exercises in scheduled workouts. To resolve this situation two junction tables were introduced ExercisesInScheduledWorkout and ExercisesInWorkouts. To the left is the diagram I designed which provided me with visual aid throughout development and will help the reader understand the database layout.

Conclusion

This university assignment resulted in a high-distinction grade and demonstrates the ability to solve real-world problems with analytical skills, project management and problem-solving skills. If you are a prospective employer, feel free to reach out and request the source code or ask any questions you have regarding the application.