
Explore macOS development with SwiftUI through project-based learning, mastering state management with wrappers, binding, environment objects, and environment variables, then build reminders, maps, and stock apps using Core Data.
Outline prerequisites for this course, including a strong grasp of iOS or Mac architecture and the surf language, plus closures, structs, and familiarity with Sophie UI; Monterrey 12.0.1+ is required.
Download the per-lecture exercise files to access resource code, and retrieve the final lecture file in the last section to obtain the completed project, such as the reminders app.
Discover a pragmatic macOS SwiftUI course, mastering state management and MVP patterns through hands-on projects like reminders, maps, and stocks.
Explore how SwiftUI serves as Apple's declarative framework for building cross-platform apps across macOS, iOS, iPadOS, and watchOS using a single, expressive syntax.
Explore how to build macOS user interfaces with SwiftUI stacks: VStack, HStack, and ZStack, using frames, spacing, alignment, offsets, rotations, and embedding to arrange and layer views.
Bind data collection to List in SwiftUI to display ranges like 1 to 10 or arrays of names, with unique identities, and explore split view with a sidebar via NavigationView.
Explore displaying images in a SwiftUI list by using preview assets, applying resizable and aspect ratio, and setting frames, then compare image with async image for url-based content.
Learn how the @State wrapper lets a SwiftUI counter update and re-render the view when the button increments, and why rendering depends on using the value in the user interface.
Explore how state and binding drive SwiftUI interfaces, using a toggle to switch an image between on and off, with live UI updates and conditional rendering.
Explore how to build a color selector in SwiftUI and use @Binding to share the selected color between a child view and its parent, updating a rectangle’s fill.
Learn to create a global environment object to share a counter across multiple views in SwiftUI, using observable object, published properties, and environmentObject injection to keep views synchronized.
Examine how environment values propagate down a view hierarchy, enabling properties like line limit, color scheme, and accessibility to flow to child views.
Explore how to use environment values in a SwiftUI app, toggle layout direction and present sheets through presentation mode, and leverage the managed object context.
Use the color scheme environment variable to adapt text for dark or light mode. Observe changes by switching system appearance.
Explore design patterns as best practices that solve specific problems and relate classes and objects, and see how the MBM design pattern demonstrates programming independence and maintainability.
Explore the mvvm design pattern, where the view displays data from the model via a view model, which acts as the middleman between the view and the model.
Explore why the model-view-viewmodel pattern promotes clean separation by using a password reset view model that handles username, new password, and confirm password with client-side validation.
Learn how to structure macOS apps with a view, view model, and a web service to fetch customer information via web APIs, avoiding direct view to service calls.
Build a reminders app with core data relationships, managing lists and tasks, due dates, and status changes, including adding, editing, deleting, and completing items with a short grace period.
Build a macOS SwiftUI two-column layout with a home screen, featuring a left sidebar, a right detail area, and a reusable sidebar view with an add button.
Create and configure a core data model for a list, with an entity named my list, requiring a non-optional name and a transformable color, using manual code generation.
Register a core data manager and initialize a shared persistent container using the reminder model, then inject the view context into the environment as the managed object context.
Develop an add new list view model as an observable object to capture name and color, access the managed object context, and save a new myList entity.
Define a base model protocol to provide save, delete, and get by id for Core Data entities, using a static view context and default implementations for NSManagedObject subclasses.
Design the add new list in SwiftUI, wire an observed object view model, present a sheet to add a list with color, and implement a color transformer for Core Data.
Build an NSColor transformer to convert between data and NSColor, implementing transform value and reverse transform value, using secure coding and archiving for color data.
Register NSColorTransformer by configuring the core data manager to register the transformer before creating the persistent container, enabling color transformation for lists in a macOS SwiftUI app.
Implement a my list view model using a fetch results controller with core data, mapping core data lists to a view model and updating on changes.
Display and manage lists in a SwiftUI view with a live view model, using a fetch results controller to show reminders and groceries.
Implement deleting a list via a context menu, fetching by managed object id, and using a base model delete function to save changes and refresh.
Define a core data model with my list and my list item entities, add title, is completed, and due date attributes, and establish a two-way cascade relationship to manage items.
Create a navigation flow to view reminders and groceries. Implement a my list items header view showing name, count, and color, and a my list items view with placeholders.
Implement the mindless item view model to present core data items with title and due date, and map them to view models for list view with counts and non-completed filtering.
Create an add new list item view with a leading icon, title field, and a bound due date, plus a calendar date picker for today, tomorrow, or custom dates.
Learn to save a list item by wiring a save action via an on item added closure, passing title and due date to the parent and updating the view model.
Wire in an items array via a list items view model to display each item with its title and due date, add dividers, and prepare for editing.
Build a rich list item cell that shows title and due date with past-due coloring, and reveal a delete control on hover to prepare for item deletion, updates, and completion.
Implement deletion of list items using closures and an on item deleted callback to the parent view model.
Update a list item in a SwiftUI project by editing its title and date via an edit list item view model, calendar button, and popover.
learn to observe core data context changes via the default notification center and managed object context objects did change to refresh the fetch results controller and update list items instantly.
Learn to mark to-do items as completed by tapping a circle, using a boolean state, updating the model via a parent, and preparing a delayed delete undo flow.
Implement a delay class that schedules work with a configurable seconds value using a dispatch work item on the main thread. Enable undoable completion and cancellation, mirroring macOS reminders.
Replace hardcoded counts with the list view model's items count and display it via the all items count view. Use the reduce function to compute the total.
Inject a live view model into the home screen and use the managed object context to unwrap and display the first list by default, rendering its header and items.
Build a SwiftUI maps app that shows your location, searches points of interest, displays annotations and directions with overlays, and offers miles and kilometers and map mode preferences.
Set up a macOS SwiftUI project with a two-column layout by creating a maps app structure, including a home screen, a sidebar, and a maps screen.
Display a map in a macOS app using MapKit via a SwiftUI representable instead of the built-in map view, and show the user’s location after enabling signing and capabilities.
Create a map view coordinator to handle map events from the map view delegate, update the user location region, and perform animated zoom with latitude and longitude delta values.
Implement a macOS SwiftUI location manager to get the user's current location and a search region for nearby points of interest like restaurants, burgers, and coffee shops.
Add a search bar to the left sidebar and display dummy results using SwiftUI's searchable feature, binding a search string and using onChange to respond to input.
Build a macOS SwiftUI search flow with MKLocalSearch. Create a search results view model and location manager to provide the region and query map items when input exceeds four characters.
Display search results as place annotations on the map and in the sidebar by converting map items into identifiable annotations, then share them through a global app state.
Calculate and display the distance from the user’s current location to map annotations, format the distance in meters, then convert to miles or kilometers and show pins with driving directions.
Display place annotations on the map by wiring search results to a global state and passing an annotations array to the map view, refreshing the map to update annotations.
Select an annotation on the map to reveal a custom callout with place details, including a directions button, phone, and address, and learn to build the callout view.
Configure map snapshot options and camera to capture a location, then render the image in the UI. Update the snapshot by selecting left menu items and exploring map types.
Attach an on select closure to the search results list to capture the tapped place annotation and update the app state for map view to display the selection.
Add a completion closure to the calculate route function to obtain the route, unwrap it, and display directions in a route popover controlled by a route content view controller.
Develop a macOS route view with MapKit, a scrollable directions panel built from a document and stack views, displaying left/right turn icons and handling direction order for localization.
Learn to add a directions overlay on a macOS map by clearing overlays, rendering a polyline with a chosen color and width, and displaying route paths above roads and labels.
SwiftUI was introduced at WWDC 2019 and it has dramatically changed the future direction of iOS, macOS and watchOS applications. SwiftUI provides an easy to use declarative syntax, which allows you to quickly create high performance apps with less code.
In this course, you will learn how to implement macOS applications using SwiftUI framework. This course is a project based course, which means you will learn by building real world applications.
Let’s check out the contents of the course.
Quick Tour of SwiftUI
In this section, you will get a quick tour of SwiftUI framework. This will include different Stack controls, List, Button etc.
State Management in SwiftUI
In this section, you will learn about different state management techniques available in SwiftUI. This includes @State, @Binding, @EnvironmentObject and @Environment.
Understanding MVVM Design Pattern
In this section, you will learn and understand the MVVM Design Pattern. MVVM pattern is the most common pattern used when implementing SwiftUI applications.
Reminders
In this section, you will implement the Reminders application from start to finish. You will use Core Data to persist information into the SQLite database. You will also learn how to set up one-to-many relationships in Core Data.
Maps
In this section, you will implement the Maps application. You will learn how to use NSViewRepresentable to configure and set up maps for macOS applications. You will also learn how to search for close by businesses and display them on the screen. This app also covers how to calculate directions from the user's current location to the destination and how to display an overlay on the map. You will also learn how to implement the preferences screen allowing users to change measurement units.
Stocks
In this section, you will learn how to create the Stocks application using SwiftUI. You will learn how to integrate your app with multiple Web APIs and consume JSON data. The app will also demonstrate how to display graphs and news associated with each stock. You will also learn how to create a lightweight routing engine for your application.
Who is this course for?
Developers interested in expanding their skills from iOS to macOS platforms.
For developers who want to learn about implementing large applications using SwiftUI framework.
Developers who want to move to the senior role by learning advanced techniques for app development.
I had so much fun in creating this course, I consider this to be one of my best courses. Thank you so much for your continuous support. Hope you enjoy the course.