Learn Courses My Dashboard

HealthKit Community App Challenge

Hey CodeCrew,

We’ve got a new community app challenge! This month’s theme is HealthKit so to participate, you can build an app that integrates HealthKit or you can use our app requirements below.

For this challenge, our team decided to build a Hydration app to track water consumption with logging to HealthKit.

Here’s a preview video of our solution: CWC Sept 2021 HealthKit App Challenge - YouTube
(App and video made by Jesse on our team)

What are the app requirements?

For this challenge, you will create an app that allows users to track their daily intake of water. It should have a fun, visual and easy-to-use interface.

Your Own Requirements:

Just a reminder that this month, we’re allowing you to come up with your own app idea and thus, your own app requirements! You can do your own thing or use our requirements below for a hydration tracker app.

Basic Requirements:

Your hydration app should…

  • Allow users to log their water intake; each entry should store the amount, a type of drink and the time it was logged

  • Allow users to set a target amount/goal of total fluid intake to reach

  • Have persistent data

  • Opening the app should not delete the user’s previous entries!

Note: you do not need to use CoreData for persistent data: we recommend using UserDefaults. See below for useful resources on how to implement this!

Bonus specifications:

As a bonus, your app can…

  • Reset entries with each new day

  • Log to Apple Health using HealthKit; this is a major step up! We provided some resources below to help you with this, but we recommend taking the time to research the functionality of HealthKit before you embark on this challenge

Further challenges:

To really spice things up, we challenge your app to…

Display a graphical representation of trends over time (our provided solution does not have this)

A preview of our solution:

  • Video (App and video made by Jesse on our team)
  • We’ll post the code to our own solution on Oct 1!

What is this?

Given the set of requirements below, challenge yourself to build the app!

The exercise of thinking for yourself and coming up with your own solution is a valuable learning opportunity.

How do I participate?

Simply create your own topic in the Journal section of our forum and update it with your progress as you build your app. If you already have your own Journal thread, you can continue using that.

When your app is completed, record a video to show it in action. You can record a video directly from your iOS simulator by pressing CMD+R.

We’ll combine the videos together to make a showcase reel. Upload your video here:

What are the dates?

The challenge will run from Sept 1 to Sept 30.

What do I win?

Just by participating, you’ll learn a lot and earn a nifty new forum badge:
HealthKit App Challenge Badge

At the end of the challenge, we’ll make our code available (in case you want to compare solutions) and I also want to make a video reel of all your creations!

What if I’m a beginner?

This challenge is meant for students who have already learned the basics since it’s going to require you to draw on prior experience.

If you’re just starting out, I recommend that you check out these resources instead to get up to speed and then you can participate in next month’s app challenge.

14 Day Beginner Challenge

If you have access to CWC+, completing the Foundations course will be more than enough.

If anyone has other helpful resources, reply on this topic!

Can I do the challenge after the deadline?

Yes! It’ll always be available for you to attempt and earn the badge in the future.

However, if you’re ready to participate now, you’ll get to experience it with a whole group of people also attempting it at the same time!

Additional Resources

The following resources may be helpful in your development:

Building a circular progress bar

Using UserDefaults for persistent data

Custom button styling

Official HealthKit Documentation (Apple)

HealthKit intro video (WWDC 2020, done in UIKit)

HealthKit Setup (SwiftUI)


Hey CodeCrew,

Can see my progress over here


Hey guys. I started the challenge late but was making good progress. Totally ran aground on the HealthKit integration. I stopped for a while to see what the finals would look like and maybe get some help. Seems like it really was a challenge. This is where I am right now. Still working on the HealthKit integration. Hats off to those that worked on it. The video link below needs music and it’s my first attempt using Rotato.

Last Drop - The Video


Hey @Chris2, when will you guys be disturbing the badges?

Finally! App is completed. Looking back on the challenge, this was just great (couldn’t tell that in the beginning). I learned so much and could also use existing knowledge to build this app.

Hey CodeCrew,

This challenge is a wrap!

Please fill out this form if you’ve participated in order grab your badge:

Also, here’s the source code for Jesse’s Hydration App, if you’re interested in checking out his solution!

@callmewiz Thanks for reminding me!
@Wildsparrow I’m so glad to hear that :slight_smile:
@merfinaz93 Do you mind if i use your YouTube video for the showcase reel for this challenge?

Thanks for participating in this app challenge!

1 Like