
In the resources file, there is a link to the GitHub repo so that you can clone the finished product to your Mac.
In this video, we’ll walk through the functionality of the Habit Tracker app built in this course. You’ll see how the app allows users to:
Add new tasks or habits with a custom name
View a dynamic list of all current habits
Mark habits as complete or incomplete with a single tap
View real-time progress updates as tasks are completed
Reset the habit list or toggle individual task states
Track total and completed habit counts
Persist data locally across app sessions
This demo highlights the polished user experience and clean SwiftUI interface, but it’s what’s under the hood that matters most.
In this video, you'll learn how to define the core Habit model that powers our task-tracking app. We'll walk through how to structure the model using Swift’s struct, add essential properties like id, name, and isCompleted, and make it conform to Identifiable, Codable, and Equatable—all critical for SwiftUI views, persistence, and unit testing. This foundational step is key to building a scalable and testable SwiftUI application.
In this video, we implement the HabitStorage service—our app’s persistence layer—along with the HabitStorageProtocol it conforms to. You’ll learn how to design a clean abstraction for saving and loading habit data using UserDefaults, while adhering to protocol-oriented programming principles. This separation of concerns ensures your app remains modular, testable, and easy to extend or replace in the future. Whether you're preparing for interviews or writing production-level SwiftUI code, understanding this pattern is essential.
In this video, we build the HabitViewModel, the core logic layer that connects the user interface to the data in our SwiftUI app. You’ll learn how to manage app state using @Published, respond to user interactions, and use dependency injection to connect the view model to a storage service. This is a hands-on implementation of the MVVM design pattern, structured for clarity, scalability, and testability—exactly how real-world SwiftUI apps should be built.
In this video, we create the main SwiftUI view that powers the user interface of the Habit Tracker app. You'll learn how to use @ObservedObject to connect to the HabitViewModel, design a clean and interactive layout using VStack, List, ProgressView, and buttons, and bind user input with @State. We'll also show how to use system symbols and custom styling to give the interface a polished, intuitive feel. This video brings together architecture and UI to form a responsive, real-world SwiftUI experience.
In this video, we create the EnumerationValuesTests file to verify the integrity of our app’s constants. You’ll learn how to write simple but effective tests to ensure that your storage keys, system symbols, and UI strings are correctly defined and don’t silently break as the project evolves. Even though enums often seem “safe,” validating them helps maintain reliability across the codebase—especially in production apps.
n this video, we build HabitStorageIntegrationTests to ensure that our storage layer works as expected with real data. You'll learn how to simulate saving and loading habits using UserDefaults, verify data persistence across app sessions, and test the actual behavior of your storage service without mocks. These integration tests are a crucial step toward validating your app's architecture under realistic conditions—ensuring data flows reliably from storage to the user interface.
In this video, we create HabitTrackerExtensionTests to validate utility extensions used across our app—specifically the Double.asPercent computed property. You'll learn why testing extensions is essential for maintaining correctness in utility logic, and how to write focused unit tests that catch formatting issues or edge cases early. This reinforces your habit of testing every layer of your codebase, even those that seem trivial.
In this video, we create HabitTrackerModelTests to verify the behavior and integrity of the Habit model. You’ll learn how to test initialization, equality, identity, and encoding/decoding functionality to ensure your model conforms to Codable, Equatable, and Identifiable correctly. These tests form the foundation of a reliable codebase, catching subtle issues early and ensuring the core data structure behaves exactly as expected.
In this video, we create HabitTrackerModelTests to verify the behavior and integrity of the Habit model. You’ll learn how to test initialization, equality, identity, and encoding/decoding functionality to ensure your model conforms to Codable, Equatable, and Identifiable correctly. These tests form the foundation of a reliable codebase, catching subtle issues early and ensuring the core data structure behaves exactly as expected.
In this video, we dive deep into the unit tests behind a SwiftUI-based habit tracking app. We'll walk through the HabitTrackerViewModelTests test suite, showing how each function validates key behaviors of the HabitViewModel. From adding, removing, and clearing habits to testing completion status, progress tracking, and data persistence with mock storage—this comprehensive suite ensures your app logic stays reliable and bug-free.
Like many self-taught iOS developers, I’ve taken my share of online courses — and I’ve noticed a frustrating pattern: most courses either skip unit testing entirely or cover it in abstract, unrealistic ways. You’re shown how XCTest works in isolation, but never how it fits into an actual app. This course fixes that.
In this course, you’ll build a fully functional SwiftUI to-do list app with all the real-world features you’d expect: task management, progress tracking, persistent storage, and completion toggles. But what sets this course apart is the testing. You won’t just “learn” unit testing — you’ll apply it meaningfully inside a real architecture, with a proper ViewModel, mocking, and dependency injection.
Every unit test in this course serves a purpose. I walk you through how and why to test each part of the system — not just happy paths, but edge cases, error handling, and persistent state. You’ll gain an intuition for when tests matter and how to write them so they’re fast, clear, and maintainable.
If you’re tired of courses that barely scratch the surface or leave testing as an afterthought, this course is for you. There isn’t a more realistic or comprehensive course on unit testing in SwiftUI available today.
By the end, you’ll not only have a polished, production-grade app in your portfolio — you’ll also have the testing skills that set real iOS developers apart from the crowd.