macOS Apprentice Update

6th March 2025 • 730 words • 4 minutes reading time.

The second edition of macOS Apprentice has been released!

If you're a beginner or near-beginner who wants to start learning Swift, SwiftUI and AppKit for building Mac apps, then this is the book for you.

This edition has been updated for Swift 5.9, macOS 15 and Xcode 16.2.

Book Cover

macOS Apprentice is a series of multi-chapter tutorials where you'll learn about developing native macOS apps in Swift, using both SwiftUI — Apple's newest user interface technology — and AppKit — the venerable UI framework. Along the way, you'll learn several ways to execute Swift code and you'll build two fully featured apps from scratch.

If you're new to macOS and Swift, or to programming in general, learning how to write an app can seem incredibly overwhelming.

That's why you need a guide that:

  • Shows you how to write an app step-by-step.
  • Uses tons of illustrations and screenshots to make everything clear.
  • Guides you in a fun and easy-going manner.

You'll start at the very beginning. The first section assumes you have little to no knowledge of programming in Swift. It walks you through installing Xcode and then teaches you the basics of the Swift programming language. Along the way, you'll explore several different ways to run Swift code, taking advantage of the fact that you're developing natively on macOS.

macOS Apprentice doesn't cover every single feature of macOS; it focuses on the absolutely essential ones. Instead of just covering a list of features, macOS Apprentice does something much more important: It explains how all the building blocks fit together and what is involved in building real apps. You're not going to create quick example programs that demonstrate how to accomplish a single feature. Instead, you'll develop complete, fully-formed apps, while exploring many of the complexities and joys of programming macOS.

Contents

The book consists of four sections:

Section 1: Install Xcode and learn the basics of programming in Swift. Experiment with several different ways to execute Swift code on your Mac.

Section 2: Use SwiftUI to develop a word-guessing game called Snowman. Learn about data flow in SwiftUI, managing multiple windows, using charts and adding macOS-specific features such as toolbars and menus.

Section 3: There are still a number of tasks where AppKit works better than SwiftUI. In this section, build an AppKit app to browse movie data from IMDb, the online movie database.

Section 4: Add AppKit to your SwiftUI app and add SwiftUI to your AppKit app in order to add some finishing touches to both of the apps from the previous sections.

You can read more details of the book contents in the Introduction.

If you are a more experienced iOS developer who wants to branch out into macOS development, then my previous book - macOS by Tutorials - might be a better fit, although I think you could still learn a lot of Mac app tips and tricks from this one.

Where Can You Find the Resources?

You can read the book online at kodeco.com as part of a Kodeco subscription. The introduction and the first chapter are free to read.

All the code and extra materials for the book can be downloaded or cloned from GitHub.

For support, to ask questions or to report any errors, please go to the forum.

Thanks to...

This book was made possible by an awesome team. There were a lot of people involved, but I want to give special thanks to:

  • Richard Critz, the wonderful editor who had the unenviable task of fixing my grammar.
  • Audrey Tam and Ehab Amer were the amazing tech editors who had to make sure that it all worked. Audrey also contributed the first chapter on installing and setting up Xcode.

The whole team at Kodeco was great, so a huge thanks to them all. I hope they enjoyed working on the book as much as I did! It's wonderful to have such a supportive group working to make my content as good as it can be.

Feedback

I would love to hear from anyone who read the book, loved it, hated it, found an error or just wanted to say hello.

You can contact me directly using any of the contact links at the bottom of this page or through the Contact page.