HACKER Q&A
📣 soapdog

Book Recommendation for macOS Development


Hi Folks,

I'm trying to get back into macOS application development. I used to know the basics of Objective-C and Cocoa stuff back on the early days of Mac OS X with big cat names. At the time, I got a lot of value from the Cocoa Programming book from Big Nerd Ranch.

These days, it seems that every book about programming for Apple platforms is focused on iOS. Don't get me wrong, I love my iPad, but I'd rather develop desktop apps.

It appears to me that the documentation site has been neglected, and that the search engine algorithms favour returning videos and quick tutorials over books. Anyway, I'm having a hard time figuring out a good recent book about developing desktop apps for macOS. I don't care if it is Swift or Objective-C, I like both.

Can someone here point me in a good direction?

Thanks.


  👤 KerrAvon Accepted Answer ✓
The market situations does not look as dire to me as it does to finiteseries; the audience is as large as ever and there are Mac-only developers doing perfectly fine.

The problem specifically with books is more that developer attention is split between Catalyst (UIKit), SwiftUI, and (AppKit | UIKit), and if you’re going to document something in this space, everything that isn’t AppKit has a larger audience.

But I do need to point out that AppKit is now in the position Carbon was in during the 2000’s — the future on macOS, if there is one, is evidently UIKit via Catalyst or SwiftUI no matter what assurances Apple makes. I would not advise a new developer to learn AppKit at this point in time.


👤 brailsafe
I also read the Cocoa Big Nerd Ranch guide, and wish they'd do another. Alot of those concepts are not entirely gone, and can still be put to use. If you already know a bit of Obj-C and AppKit, then I'd recommend hackingwithswift.com. He has a great number of tutorial series on Swift, SwiftUI, and iOS and Mac programming. He also has a paid mini course I believe. Other than that, it's a pretty guerilla effort, but it is fun

👤 nikivi
[Books by Objc.io](https://www.objc.io/books/) are great. Also whilst not a book, [Composable Architecture](https://github.com/pointfreeco/swift-composable-architecture) seems like a nice way to develop cross platform (iOS/macOS) apps.

👤 spaceywilly
This might not be exactly what you’re looking for, but I read the “big nerd ranch guide to iOS programming” which was a really great book for learning iOS development. I then built an app for iOS and found that bringing it to macOS was very simple using catalyst. Mac now makes up 1/3 of my (very tiny) revenue. So, that might be one way for you to go, with the added benefit that you’ll know how to build iOS apps as well as Mac apps.

👤 thomasbibby
I’m an iOS dev, but I have developed some macOS apps for internal use using AppKit: I’d like to think they were pretty good apps if not quite production ready. I think the Big Nerd Ranch Cocoa Programming Guide for OSX is still the best book out there. The version I have is from 2015 which targets Swift 1.2 and Yosemite: you might actually be better off with an earlier version that targets Objective-C as Swift has changed quite a lot since then. If you go through the Big Nerd Ranch book you’ll have enough to use the start using the official documentation effectively. AppKit is very old for sure, and has a lot of weird corners, but you can be incredibly productive with it: and there is still a lot more Interface Builder “magic” developing for macOS than there is with iOS. Combined with the brilliance of the Foundation stdlib it can be a pleasure. My own experience is that if you avoid fighting AppKit you’ll have a very productive time. I wouldn’t support some of the recommendations for SwiftUI and Catalyst. As other commenters have noted you’ll have to “drop down” to AppKit anyway to create a good app.

👤 finiteseries
There aren’t any, the market for native Mac development is too small to support a good published book.

You will be spending inordinate amounts of time in the Documentation Archive reading still applicable (and well written) docs, on S/O reading the ~3 threads that relate to your issue, blog posts from ~2010 and a whole lot of time searching specific APIs w/ GH code search to see how a repo from 2014 used it. And you’ll be alone in time and space if you’re not at a co while doing it.

Web developers are far more common, far cheaper, and far better supported by the ecosystem, you can literally just plug and play them entirely unlike eg iOS developers -> AppKit.

If this is a personal thing, have fun it’s very rewarding. If this is business/career, either learn Mandarin or turn around now, there is no hope or future here.


👤 peppertree
I would start with SwiftUI. Aiming where the ball is going not where it is.

👤 Shadonototra
https://developer.apple.com/tutorials/swiftui

https://developer.apple.com/learn/curriculum/

All you need to get started, it's free

Best way to make things easier for you is to sketch an idea, and learn as you go, swift is a fun language, and swiftui is the best GUI libraries i ever got to try

One thing.. XCode sucks.. if you like jetbrains product, there is AppCode: https://www.jetbrains.com/appcode/