I need to build a Xamarin application for iOS only that interfaces with Apple HealthKit and transmits workout data to my API.
The tab bar at the bottom of the app screen will have three items: Workouts, Log Entries, and Credentials.
Workouts will show a list view of all HKWorkout entries in Apple HealthKit. Each entry will show the start date and time and total minutes (duration) of the workout. In addition, there will be an icon on the left indicating whether that workout data has been successfully uploaded to the API.
Log Entries will simply show a debug output of what the app is doing, for example "Sending 2 workouts to API", "Received message from API: Success!", "Login data could not be confirmed", etc. Eventually I will hide or remove this view.
Credentials will be a simple login screen with username and password. This view will display by default if credentials have not been stored in the app, or the API sends back an error that the credentials are invalid.
Below is the normal flow of the app:
- User clicks app icon
- Splash screen displays our logo
- List of workouts appear, ordered with most recent at top
- If any workouts have not been sent successfully, the message pops and alert, "You have x new workouts! Click OK to submit your results!" If no new workouts, then just display list.
- User clicks OK
- App composes a JSON string containing user credentials, each HKWorkout, and individual HKSamples for each workout (samples will contain date time, duration, heart rate, and distance (if present))
- App posts JSON to our API, shows swirly on screen, then shows success message if all good
- App sets indicator on workout showing that it has been uploaded
That's it. Basically you're just reading data from Health Kit, reformatting it, and posting it to a webservice endpoint. I will provide the API reference separately.
Please only respond if you have fully read the job description and have relevant Xamarin experience!
Thanks and good luck!