Built using swift, Wadio is an iOS App used to keep track of how many days a National Serviceman in Singapore has left in service before they are operationally ready, known as the ORD date.
Besides a large ORD counter, the user can keep track of the number of leave days they have left, as well as the number of off days they have earned throughout their NS period.
There is also an IPPT scorer, which uses the scoring table for IPPT from MINDEF in order to determine the user's final IPPT score from their push up and sit up counts, as well as their 2.4km run timing.
You can set a goal for your IPPT score and check the number of push ups, sit ups and run timing needed to meet your goal
Using swiftUI, there is a simple but intuitive navigation system to navigate between the home view and other views.
Create a new project in Xcode as a SwiftUI App. Then, copy and paste the projects into the file. Run the iPhone/iPad/Any simulator that you wish to test it. I don't have a paid developer account, so I am unable to preview it without Xcode.
The main App is in the following files:
- MyApp
The project is spilt into the different views you see.
- ContentView
- IPPTView
- SettingsView
- OnBoardingView
There are companion files used in multiple views, which contain important functions, mainly the conversion of Date types to String types in order to store dates in appStorage (as appStorage does not support storing dates yet).
- DateUtilities
There is also a data folder that contains all the data used for IPPTView, to calculate the final IPPT score and update the latest IPPT score
- agegroup
- pushup
- run
- situp
All files are laid out in the following format (including or excluding some sections where relevant) // MARK: Navigation Layout - How NavigationView is built // MARK: (viewName) Layout - How the respective view is built // MARK: UI Layout - How the UI elements are built // MARK: Logic - Functions
There is a UserData class, as well as an IPPTData class to keep track of user information. All information in both classes are stored using AppStorage.
Features
-
Show ORD date + circular graphic to show progress Note a. NS has 22 or 24 months
-
Show most recent IPPT score and open a new tab to calculate IPPT score Note b. the IPPT score combinations are stored in Data.
-
Show number of days to payday and cumulative amount earned from NS Note c. we need to get the rank and the exact pay amount for each month Note d. idea: allow user to choose rank and their pay (or enter a custom amount each month)
-
Show the number of remaining leave days Note a. All NSFs get 14 days of leave every calendar year
Features 1: Slider to choose target IPPT Score if clicked 2: UI to calcuate pushup, situp and 2.4km timing Note a. to show the final IPPT score at the bottom right of the subview as a updating textfield 3: An update button to send to HomeView the latest IPPT score obtained from the textfield
Features 1: Edit the Name of the user 2: Edit the remaining leave and off count from the user 3: Edit the Enlistment Date of the user 4: Acknowledgements and credits, version number
View to onboard the user. Nothing much to see here.
Functions:
DateUtilities.dateToString(date: Date) -> String
Accepts a date of data type "Date" and converts it to a "String". Return format string: "MMM dd, yyyy" Example: "Jun 23, 2023"
DateUtilities.StringtoDate(date: String) -> Date The reverse function of dateToString
Accepts a date of data type "String" and converts it to a "Date". Input format string: "MMM dd, yyyy" Example: "Jun 23, 2023" Return format: a date with type "Date"