App Templates  /  Sleep Tracker
iOS app template · Full source code

Sleep Tracker - Your Path to Better Sleep

Sleep Well, Live Happy: Where Sleep and Mood Tracking Unite.
SwiftUI Source Code. In-App Purchases. AdMob Ads.

SwiftUIiOS 15+Xcode 14+AdMobIn-App Purchases
$189
Buy Source Code
  • Complete Xcode project
  • Full SwiftUI source code
  • Free support included
Watch the video demo ↓
Full source codeCustomize the complete Xcode project
SwiftUINative Apple development
iOS 15+Minimum supported iOS version
Free supportHelp with the source code as delivered
About the template

Sleep Tracker

Is $400,000 a month in revenue too much? Well, Sleep Watch reported that much revenue last month, based on the SensorTower report. That app has been around since 2016, and it's understandable why it is so successful. You can check the Sleep Cycle app, generating $1m/month and it is featured by Apple (Editor's Choice). We are not promising you such extreme success, but these are just some examples of the sleep-tracking niche. It's a lucrative domain, and Apple is constantly focusing on improving people's lives and health via its technology.

You will get the source code of the app that you see in the video demo. Nothing more or less than what the video demo shows. Feel free to ask questions before buying. The app is built using SwiftUI. The app doesn't need HealthKit or Health app permissions. Users start and end sleep sessions with swipes, which track sleep hours in Core Data. Mood tracking data is also stored in Core Data. Sleep quality is calculated from sleep duration. All sleep tips are stored within the app.

Requirements

What do I need to get started?

You will need a Mac computer with Xcode 14+ installed. This app requires iOS 15+. All app templates on this website are for iPhones without iPad support. An AdMob account is necessary if you want to show ads in the app. We provide you with some basic PDF documentation on how to replace the AdMob Interstitial Ad identifiers, and how to replace the in-app purchase product identifier.

How it works

How does it work?

  • On the main dashboard of the app, you'll find the user's name/avatar, a carousel of sleep tips, a mood-tracking section, and the option to initiate a sleep session.
  • The name and avatar serve as a personalized greeting for the user and can be customized by them at any time. All avatars are preloaded within the app.
  • The mood feature empowers users to monitor their emotional state, identify contributing factors, and write down a brief note for self-reflection. Users can log their mood once daily, encouraging thoughtful reflection before bedtime.
  • Initiating a sleep session by swiping upwards records the current date and time in Core Data, marking the start of tracking. Even if users completely close the app, it will continue tracking. Upon relaunch, if an ongoing session exists, users can simply swipe up to conclude it.
  • Concluding a sleep session by swiping upwards reveals the sleep score. This score is manually computed within the app based on the total hours of sleep.
  • The Statistics section showcases average daily and monthly sleep durations. Additionally, it displays mood levels for the past 7 days. Selecting a specific day on the chart unveils the user's notes for that date.
  • By default, users have limited access to the Statistics section and can track only 2 sleep sessions. For full access to the Statistics section and unlimited session tracking, users can opt for in-app purchases.
  • In-App Purchases are handled via a private framework. This framework doesn't support subscriptions. You can use this framework for any other games/apps you want to add in-app purchases. If you want auto-renewable subscriptions, please contact us or search for 'PurchaseKit by Apps4World' on the website in order to get the full version of the PurchaseKit product.
Video demo

Quality Sleep & Positive Mood

Unlock the Power of Quality Sleep to Uplift Your Mood with our Sleep Tracker

Need more than the template?

I can customize this project for your product, add features, or use it as the starting point for a larger native iOS app.

Discuss a custom build →