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://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.
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.
If you want to make Mac apps, learn AppKit. You can use AppKit from Swift just fine, there's no need to use Objective C. Some of the text APIs are a bit cumbersome to use with Swift because of the different string semantics, but for the most part writing AppKit code in Swift is pretty sweet.
But for more involved stuff this is not production ready yet (except you want to do major reworks with each new SwiftUI revision).
- Performance: Sometimes the automatic conversion between Objective C and Swift types causes performance issues. Using Objective-C for some hot paths can be a lot faster. Sometimes just using NSString instead of String in Swift can also do the trick.
- Legacy code: For most projects, there is no point in converting 100s of legacy Objective C classes to Swift. Just leave the old parts in Objective C, and call them from Swift. Rewriting just risks breaking stuff.
- Interface with C/C++ code. Swift has some nice bridging that make calling C code easy (such as automatic conversion of swift strings), but some APIs like socket() are close to unusable in Swift, because they require complicated casts that are impossible to understand. Easier to write those parts in Objective C.
More crucially, I'd be curious what people's thoughts are on why the MacOS development community doesn't have newer resources like this.
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...