Live data from Hacker News

Ask HN: Resources to Learn macOS Development?

news.ycombinator.com

11–20 of 91 posts

Re: Ask HN: Resources to Learn macOS Development?

#11
Do a little iOS dev since that has 100x more learning resources.

Once you grok iOS, you'll be at home with macOS since they follow the same patterns.

Stick with storyboards, don't bother with SwiftUI (no, really, don't do it) and try to use as much default out of the box behaviour as possible, instead of wondering 'how do I do that X thing I did on platform Y'.

Re: Ask HN: Resources to Learn macOS Development?

#12
I recently did the SwiftUI tutorials that had a chapter on macOS (from the context of adding macOS as a target alongside iOS). https://developer.apple.com/tutorials/swiftui

I expect SwiftUI to stay pretty high-level so don’t expect nitty gritty details. But Apple seems to be putting a lot of effort there so you might want to check it out.

Re: Ask HN: Resources to Learn macOS Development?

#14
If you're not writing command line programs (99% of what I do) I suggest adopting SwiftUI for your interface.

It's Apple's future for cross platform (ios/macos/watch) applications. Hardcore longtime mac devs find it frustratingly unable to do some complex things they want to do (and yay that they do!) to take advantage of the mac OS. But you don't want that; you just want to interact with your own code. And SwiftUI will let you do the basic stuff easily...and likely just (well, almost just) recompile your program for your iphone or ipad.

Re: Ask HN: Resources to Learn macOS Development?

#15
post #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.

my bad! i did not see that.

Re: Ask HN: Resources to Learn macOS Development?

#16
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…

This is the best answer for hobby Mac programming for AppKit in Objective-C.

As others have said, SwiftUI is the future and you might want to instead look at that if you can find a decent guide to it -- a lot of what's on the web is very badly obsolete already. It's a very different model.

Folks, there will come a point where new UI features don't ship anymore for AppKit. Telling people not to learn SwiftUI is extremely counterproductive.

Re: Ask HN: Resources to Learn macOS Development?

#17
post #14

If you're not writing command line programs (99% of what I do) I suggest adopting SwiftUI for your interface. It's Apple's future for cross platform (ios/macos/watch) applications. Hardcore longtime mac devs find it frustratingly unable to do some complex things they want to do (and yay that they do!) to take advantage of the mac OS. But you don't want that; you just want to interact with your own code. And SwiftUI w…

What sort of complex things are they unable to do? Is there any recourse? Can you use SwiftUI for the majority and dip into something lower level when needed?

Re: Ask HN: Resources to Learn macOS Development?

#18
In a past life I spent a lot of time developing for iOS, and the one incredibly sore spots in terms of documentation was the build process. Particularly, what are all the things I need to know to effectively build my app, and debug the process.

The Apple-provided documentation assumes you already know many of the ins and outs of C/C++ build arcana, and on top of that does a terrible job of explaining what parts XCode adds or subtracts to the process. I never came across a resource for this information that was even passable, and wound up getting most of my answers from IRC.

Re: Ask HN: Resources to Learn macOS Development?

#19
post #14

If you're not writing command line programs (99% of what I do) I suggest adopting SwiftUI for your interface. It's Apple's future for cross platform (ios/macos/watch) applications. Hardcore longtime mac devs find it frustratingly unable to do some complex things they want to do (and yay that they do!) to take advantage of the mac OS. But you don't want that; you just want to interact with your own code. And SwiftUI w…

Yeah, macOS development is in a tricky spot at the moment: Apple has signaled that SwiftUI is the future, and so starting out with ObjC/Cocoa is making yourself obsolete right from the get-go, but SwiftUI is not production-ready yet and doing anything serious with it is difficult if not impossible.

Presumably in a few more years the wrinkles will be ironed out of SwiftUI, but right this instant is unfortunately a crummy time to start out with Mac development. I would also agree that you should start with SwiftUI, but just with the awareness that it sucks ass and that you'll have to throw out most of what you write over the next few years.

Re: Ask HN: Resources to Learn macOS Development?

#20
"I am looking for explanations that will help me build a conceptual understanding of macos UI development."

it depends on your learning style of course, but if you like lecture / course-style learning, i highly recommend paul hegarty's CS193P, it will definitely give you the in-depth, conceptual explanations you're describing.

while it is an iOS dev course (taught at stanford, lectures are freely offered online), the newest lectures are using swiftUI for UI, so pretty much all of it will translate to doing macOS dev.

paul is a cs prof at stanford and worked at NeXT and then on the objc lang many, many years ago, so he's been doing this a while and knows a thing or two :)

https://cs193p.sites.stanford.edu/

Post reply on HN