HACKING WITH macOS

POWER UP YOUR DESKTOP

Includes free updates for new Swift versions – click to read my update policy

Whether you have existing iOS skills or you're starting fresh, you can learn macOS coding by building real-world projects with Swift 4 and Xcode – all you need is in this course.


100% HIGH SIERRA

You can always be guaranteed you're learning the latest, greatest Apple technologies because all my tutorials are written for macOS 10.13.

100% SWIFT 4

Don't waste time with out of date tutorials – here you can learn smart, powerful, and expressive Swift the way it was meant to be written.

100% PRACTICAL

You learn Swift while you make real macOS projects, which means you get to apply your new skills immediately and see them work in context.

100% PROVEN

I've already taught thousands of people how to build iOS apps, and now I'll help you transfer your skills to macOS and unleash the power of your desktop.

WHAT'S IN THE COURSE


Hacking with macOS teaches you Swift and macOS frameworks through real-world projects. The book includes the same comprehensive Swift introduction as Hacking with Swift, but I'm also packing the book with hints and tips that help you transfer your existing iOS skills to macOS painlessly.

Hacking with macOS includes 18 projects in total: six apps, six games, and six technique projects that focus on specific macOS APIs.

Project 1: Storm Viewer

Get started coding in Swift by making an image viewer app and learning key user interface components: windows, table views, images, and split view controllers.

Project 2: Cows and Bulls

Build on your NSTableView knowledge by adding a second column, while also learning about random numbers, text input and validation, and push buttons.

Project 3: Social media

Return to project 1 and add a toolbar button so that users can share their selected picture using Mail, Messages, AirDrop, and more – it's easier than you think!

Project 4: Grid Browser

Power up your web browsing experience by viewing more than one site at a time, all thanks to NSStackView and the WebKit framework. Bonus: add controls to the Touch Bar!

Project 5: Capital Cities

The MapKit framework lets us draw maps at any resolution, then drop pins where we want it – it's perfect for a fun game about capital cities of the world!

Project 6: Auto Layout

Your macOS apps need to be able to resize themselves to fit your users' needs, and Auto Layout can make that happen – you specify the rules, and it does the rest.

Project 7: Photo Memories

Meet NSCollectionView for the first time, then add drag and drop image support so users can create watermarked home videos from their favorite images.

Project 8: Odd One Out

Learn how NSGridView lets you space user interface controls evenly on your screen, then use it to build a picture-matching game with some special effects!

Project 9: Grand Central Dispatch

GCD is a powerful framework that lets you schedule work at different times and on different threads, and this technique project gives you all you need to know.

Project 10: WeatherBar

See how easy it is to place your app's icon and menu right in the macOS status bar, then build an app to display your local weather using JSON and GCD.

Project 11: Bubble Trouble

SpriteKit has physics built right in, so this project sees you creating a physics-based bubble popping game with timers, sound effects, and more.

Project 12: Animation

Animation on macOS isn't easy, but it is powerful. In this project we build an animation sandbox to help you find ways to bring your user interface to life.

Project 13: Screenable

NSDocument brings with it great features like versioning, autosave, and more, and this project combines it with Core Graphics to build a screenshot-editing app.

Project 14: Shooting Gallery

Build a fast-paced SpriteKit shooting gallery game that brings together animations, new level support, custom mouse cursor, and keyboard input.

Project 15: UndoManager

Go back to project 12 and learn how you can add support for undo and redo using Cocoa's powerful UndoManager class and only a few extra lines of code.

Project 16: Bookworm

Use bindings to design an app that tracks the books you've read, their authors and your star rating, all while writing fewer than 20 lines of code. No, really!

Project 17: Match Three

Take your SpriteKit knowledge further by building a colorful ball-matching game, while also trying out shape nodes and particle emitters for the first time.

Project 18: Bindings

Practice your skill with Cocoa bindings by building a Fahrenheit to Celsius temperature converter, all powered by key-value coding and key-value observing.

While building projects, you'll learn all this and more:

  • How Cocoa on macOS differs from Cocoa Touch on iOS. (Note: if you're not interested in iOS, don't worry – you don't need any iOS experience to follow along, and the iOS parts are kept to a minimum!)
  • Creating advanced user interfaces with NSTableView, NSCollectionView, NSStackView, NSSplitView, and the all-new NSGridView.
  • How to build apps that look great in multi-window and tabbed user environments.
  • Designing your apps with powerful native components such as NSButton, NSTextView, NSSegmentedControl, NSImageView, and more.
  • Working with the filesystem, and using system services such as sharing and drag and drop.
  • Designing interfaces with and without storyboards, plus Auto Layout, alerts, modals, and sheets.
  • Handling mouse and keyboard events, animation, concurrency, and more.

Hacking with macOS follows the same approach I used with Hacking with Swift: small, standalone projects that teach individual techniques starting from scratch, so you end up with a huge library of finished projects you can develop further or use as the base for something entirely new.

If you loved Hacking with Swift, this is the sequel you've been waiting for.

Download full table of contents

Download free 24-page sample