Live data from Hacker News

Ask HN: Resources to Learn macOS Development?

news.ycombinator.com

41–50 of 91 posts

Re: Ask HN: Resources to Learn macOS Development?

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

I find that you have to find the right bit of documentation, which is not always easy on Apple's site. I often find API documentation that doesn't have enough info to just start using it (it's great for reference, though). You need to find the long-form descriptive documentation they have, which isn't always found by your favorite search engine. (And Apple keeps rearranging their documentation meaning that once you have found it, if you don't bookmark it, finding it again can be nearly impossible.)

Re: Ask HN: Resources to Learn macOS Development?

#42
I had great luck with the Big Nerd Ranch books[0].

I’m not sure that I can recommend starting with SwiftUI, yet. The tech is still quite green, and quite different from AppKit (the current MacOS framework). The documentation also … leaves something to be desired

But it also depends on how soon you want to be shipping software.

It might be a great idea to start with SwiftUI, if you think you’re still a couple of years from releasing stuff. I’m sure it will mature rapidly.

Of course, you could also learn a cross-platform system, like Electron, or React Native. I can’t make any suggestions, there.

Source: Been shipping native Mac software for over 30 years.

[0] https://bignerdranch.com/books/

Re: Ask HN: Resources to Learn macOS Development?

#43
post #38

"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…

+1 as well. This helped me finally build my first app, and things learned translated very easily between apple platforms. Although, I don’t agree with dismissing Electron. It’s what I eventually pivoted to in order to create a desktop software business. For me, electron is the best of all worlds, literally.

> For me, electron is the best of all worlds, literally

Sure, but it does have tradeoffs to the end user around bloat/performance. Not worth dismissing, but also not always the clear winner.

Re: Ask HN: Resources to Learn macOS Development?

#44
post #40

Earlier quoted context omitted.

The old docs that explain the fundamental concepts about the frameworks are also still available. I prefer them to the current crop of docs because they go deeper conceptually and are more information dense. It requires a little bit of effort to extract and use them. This tweet is what got me in the right direction: https://twitter.com/dmartincy/status/1393629254227832838

I totally agree – here is the legacy archive search engine https://developer.apple.com/library/archive/navigation/

Nice! I didn't know this search UI still existed. Filtering by platform and typing "programming guide" returns all the good stuff.

Re: Ask HN: Resources to Learn macOS Development?

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

It's possible to wrap UIKit in SwiftUI (using UIViewRepresentable and UIViewControllerRepresentable), to do the things that SwiftUI can't yet do by itself. Those deficiencies will slowly be filled out, of course - there's no reason to stay exclusively with UIKit any more.

More significantly, SwiftUI introduces a new declarative paradigm - very different from what was before. It makes a lot of previously laborious things, easy.

So, yes - SwiftUI is the way to go, and it's ready to use now.

Re: Ask HN: Resources to Learn macOS Development?

#46
post #38

Earlier quoted context omitted.

+1 as well. This helped me finally build my first app, and things learned translated very easily between apple platforms. Although, I don’t agree with dismissing Electron. It’s what I eventually pivoted to in order to create a desktop software business. For me, electron is the best of all worlds, literally.

> For me, electron is the best of all worlds, literally Sure, but it does have tradeoffs to the end user around bloat/performance. Not worth dismissing, but also not always the clear winner.

Emphasis on “for me” aka, the indie developer, and in terms of sales (a measure of value) for this particular use case, electron was the foundational enabling technology.

Re: Ask HN: Resources to Learn macOS Development?

#47

"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…

> 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.

They absolutely will not. SwiftUI on macOS and SwiftUI on iOS are very different beasts. For the latter, it is at the point where you can actually kind of make a good app in it with the majority of your code only using the framework. On the other hand making a good macOS app using only SwiftUI is pretty much impossible. There’s a lot of stuff that is broken, or looks wrong, or there’s controls missing or customization that’s not exposed. I would go as far as to say that you should ignore SwiftUI’s existence if you want to learn how to write a Mac app today, get familiar with the platform, then dip your toe in by trying some of the limited situations in which it actually works.

Re: Ask HN: Resources to Learn macOS Development?

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

It's possible to wrap UIKit in SwiftUI (using UIViewRepresentable and UIViewControllerRepresentable), to do the things that SwiftUI can't yet do by itself. Those deficiencies will slowly be filled out, of course - there's no reason to stay exclusively with UIKit any more. More significantly, SwiftUI introduces a new declarative paradigm - very different from what was before. It makes a lot of previously laborious thi…

On iOS. The situation is very different on macOS, which is what was being discussed here.

Re: Ask HN: Resources to Learn macOS Development?

#50

To get started, I'd Protocol Oriented Programming from WWDC. Not a tutorial or how-to, but more of a look into the philosophy behind Swift. https://developer.apple.com/videos/play/wwdc2015/408/

Ah yes, the video that launched a thousand unnecessary abstractions ;) It’s a good exercise to expand your horizons on how you might approach architecting your app but in general the answer to the question of “do I need a protocol here” will still be “no”.
Post reply on HN