Live data from Hacker News

Ask HN: Resources to Learn macOS Development?

news.ycombinator.com

81–90 of 91 posts

Re: Ask HN: Resources to Learn macOS Development?

#81
post #54

Earlier quoted context omitted.

Storyboards are slow compared to Live Preview, and lead beginners to adopt bad patterns like Massive View Controllers rather than composable/testable SwiftUI components. Not to mention its horrendous XML format.

> Storyboards are slow compared to Live Preview Citation needed. Even on Apple silicon, I'm not even sure Live Preview can crash faster than Interface Builder and it has no shortage of practice. > lead beginners to adopt bad patterns like Massive View Controllers rather than composable/testable SwiftUI components There is no requirement at all on how big a storyboard is and allowing things to occupy the same *.storyb…

Go where the puck is going, not where it’s been. It’s obvious that Apple is heavily investing in SwiftUI to implement their vision for multiplatform app support. Did you see a single storyboard in WWDC22? 21? SwiftUI examples were ubiquitous. You can argue for Storyboards until you’re blue in the face, but they are destined for the dustbin.

Re: Ask HN: Resources to Learn macOS Development?

#82

Earlier quoted context omitted.

> On the other hand making a good macOS app using only SwiftUI is pretty much impossible. How recent was your experience with it? I'm assuming your characterization is accurate, but since SwiftUI is being used for notable bits of Ventura, I'm curious what OS version it reflects. https://troz.net/post/2022/swiftui-mac-2022/

Pretty recent, I check it every once in a while to see what’s going on. Of course, with macOS generally most of the changes happen around WWDC ;) SwiftUI on macOS is currently ok for a few usecases. One is little document apps. Emphasis on little, this is going to be things that wrap an image or a text file or something. The API is reactive so it’s not really designed for complex/partial file formats. Another good us…

Thanks! I really appreciate that you shared your experience.

Re: Ask HN: Resources to Learn macOS Development?

#83
post #64

Earlier quoted context omitted.

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

These APIs exist for NSView (AppKit) as well: https://developer.apple.com/documentation/swiftui/nsviewrepr... https://developer.apple.com/documentation/swiftui/nsviewcont... Or is that not what you meant?

Yeah, I mean that it’s not ready to go.

Re: Ask HN: Resources to Learn macOS Development?

#84
post #57

Just do it. I started with one of the Big Nerd Ranch books many years ago. I spent a few evenings reading it, and then spent a few hours dabbling with Objective C in XCode. I then got frustrated and put it down for a few years until I took a job that involved some Objective C. (This was over a decade ago.) It's surprisingly easy to learn the details of system calls by Googling and looking at stack overflow. Yes, the…

Swift interops with C directly so there’s no need to wrap in Objective-C.

I just skimmed an article about that. That's quite nice.

FWIW: One of the things I really appreciated in Objective C was that I could use real C when working with a C library. It wasn't something I did often, though. But, IMO, it's definitely something that someone who wants to do low-level Mac programming should learn. Sometimes it's just easier to work with a library in C.

Re: Ask HN: Resources to Learn macOS Development?

#87
post #75
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…

> based upon older versions of Xcode and Mac OS (like ~10 years old). More crucially, I'd be curious what people's thoughts are on why the MacOS development community doesn't have newer resources like this.

2nded.

Is there a macOs equivalent of the Windows Internals [0] books?

I recently came across ImGui [1] which uses C++. I assume that cross platform software from Adobe, Microsoft, etc have C++ at their core and would love to find more in the way of resources for C++ on mac. Anyone?

[0] https://www.amazon.com/Windows-Internals-Part-architecture-m...

[1] https://github.com/ocornut/imgui

Re: Ask HN: Resources to Learn macOS Development?

#89
post #73

The other responses have some great answers, but I learn best by breaking something that is already working, and so this list may have useful sources of code to poke around in: https://github.com/serhii-londar/open-source-mac-os-apps

That list is an invaluable resource, but it's huge and a bit daunting. If you're interested but not sure which project to start with, I recommend looking at NetNewsWire[1]. It's a very nice codebase with experienced Mac and iOS developers on the team. It's cross platform (iOS, macOS, ipadOS), uses the latest technologies, and has speed and stability as design priorities. It's the opposite of an Electron wrapper aroun…

Perfect, you've provided exactly what I was fishing for - one of the list that was a quintessential perfect example of proper coding.

Re: Ask HN: Resources to Learn macOS Development?

#90
post #70

Earlier quoted context omitted.

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

How about using SwiftUI on Mac via Catalyst?

It's (how good SwiftUI is on iOS) * (how good Catalyst is on macOS), which is about (not too bad)^2≈passable.
Post reply on HN