Live data from Hacker News

Ask HN: Resources to Learn macOS Development?

news.ycombinator.com

1–10 of 91 posts

Ask HN: Resources to Learn macOS Development?

#1
Almost 25 years ago before I went down the rabbit hole of backend programming - I did some windows app development. I want to get into macOS programming now (I have been using a mac for the past 5 years and want to get to a place where I can build some hobby apps - I don't need to make money - I just need the damn machine to do what I want it to) - but I am having difficulty figuring out the right resources.

I am not interested in API documentation or how-to recipes. I am looking for explanations that will help me build a conceptual understanding of macos UI development. What is the equivalent of the event loop under macos? Do events bubble up through the hierarchy? What is the right way to persist user configuration?

In the windows era there was a very famous book called "Programming Windows" by Charles Petzold. I am hoping that I can find similar book for macOS programming.

Please do point me to the resources that have helped you.

I am not interested in non-native frameworks like Electron or PyQt. If I am developing an app for myself I don't want to deal with daily irritation of working with a non native framework.

Re: Ask HN: Resources to Learn macOS Development?

#4

Apple Developer Documentation Archive. https://developer.apple.com/library/archive/navigation/ It's filled with the specific type of knowledge you're looking for.

I second this. Apple's official documentation, while suffering from a decrease in quality over the last decade, is still as good as any "tutorial" you'll find.

Re: Ask HN: Resources to Learn macOS Development?

#5

I found this course with great ratings while browsing on Udemy this weekend: https://www.udemy.com/course/professional-macos-programming/

Last updated 11/2019

I guess it might be good to teach the basics, but I think the landscape has changed a lot when it comes to programming on the Macs.

Re: Ask HN: Resources to Learn macOS Development?

#6
One thing to decide maybe before specific books is if you want to do SwiftUI programming or more traditional Cocoa programming. They both have advantages, and they can be mixed, but if you are just learning probably best to focus on one approach to start.

SwiftUI is new future according to Apple, easy to start, but also unpolished compared to Cocoa. Cocoa is old and polished, but maybe eventually a legacy technology. I'm personally still in Cocoa world, but parts of SwiftUI are interesting.

Re: Ask HN: Resources to Learn macOS Development?

#7
I would suggest Cocoa Programming for Mac OS X, even though it's based on Objective-C and the book is old. That means it's based upon older versions of Xcode and Mac OS (like ~10 years old). Conceptually it's a good book, but because of it's age the code examples, etc are outdated. The publisher does have forums which can be helpful:

https://forums.bignerdranch.com/c/cocoa-programming-for-os-x...

They also have a Swift book, but I haven't personally read it. They also have an Advanced Mac OS X book, but it's also old and isn't on their website anymore.

https://bignerdranch.com/books/

Re: Ask HN: Resources to Learn macOS Development?

#9
post #7

I would suggest Cocoa Programming for Mac OS X , even though it's based on Objective-C and the book is old. That means it's based upon older versions of Xcode and Mac OS (like ~10 years old). Conceptually it's a good book, but because of it's age the code examples, etc are outdated. The publisher does have forums which can be helpful: https://forums.bignerdranch.com/c/cocoa-programming-for-os-x... They also have a Sw…

I would second this recommendation. This book is how I originally learned Objective-C and macOS development 20 years ago. It walks you through the fundamentals and provides a very good foundation for digesting the (archived) documentation from Apple.

Re: Ask HN: Resources to Learn macOS Development?

#10
post #8

Paul Hudson has a decent book on macOS programming using SwiftUI and AppKit. It isn't perfect but it is a decent place to start https://www.hackingwithswift.com/store/hacking-with-macos

Is it as in depth as OP appears to be looking for? I've found Paul's content to be good for quick references to high level concepts, and brief how-tos for beginners, but I've not found it to be good for deeper explorations. That said, I haven't read this book, only his free content.
Post reply on HN