Core concepts for a macOS native development newbie
Before I jump to learn native development I needed to get my basic concepts straight. Here is what I learned so far.
iOS gets much of attention for native development (vs macOS)
- Most recommendations for getting into macOS development suggest starting with iOS first
Swift and AppKit ****are used to make native UI for macOS
- Mac Catalyst allows to migrate iOS apps to run on a Mac device by interfacing between UIKit and AppKit
There are three UI libraries for native development
- UIKit (iOS)
- Framework used by iOS (Cocoa Touch) to provide its UI
- Imperative API
- AppKit (macOS)
- Framework for macOS (Cocoa)
- Imperative API
- SwiftUI (macOS and iOS)
- New declarative framework for any Apple platform.
SwiftUI seems to be the way forward but still not fully developed.
- Though it seems promising consensus seems to be it’s not ready for primetime
- Allows building user interfaces programmatically (vs storyboards)
Declarative UI programming patterns seem to be all the rage.
- On the web with frameworks like React and Vue.js,
- In cross-platform development environments like React Native and Flutter
- In native development with SwiftUI
Web-based technologies are an alternative for native development are
- React Native, Flutter, PWA
- One significant limitation seems to be that the access to native APIs is possible but complicated (at least React Native, Flutter)
- Best use seems self-contained applications where performance is not key, with limited or no OS integration.
Right now, it feels a little bit like the three main MacOS app frameworks are floating in unanchored space: AppKit is not the future, Catalyst is not ready to replace it, and using SwiftUI remains a long way off for big, complicated apps
Ok, so SwiftUI is not ready, but it seems the learning curve is small and for simple application it might be enough. It might be a good place to start for me. Alternatively I could go with React Native since I’m dabbing into React these days.
I’m sure I got something wrong. Will try to remember to update.
- Where Mac Catalyst Falls Short
- A brief reflection on Mac software stagnation
- PWA vs. Flutter vs. React Native vs. Native
- Mastering SwiftUI: Learn how to build fluid UIs and a real world app with SwiftUI (2021) — by Simon Ng
- Swift Programming: The Big Nerd Ranch Guide (2015) — by Matthew Mathias, John Gallagher
- Cocoa Programming for OS X: The Big Nerd Ranch Guide (2015)— by Aaron Hillegass, Adam Preble, Nate Chandler
- SwiftUI Essentials - iOS 15 Edition: Learn to Develop iOS Apps Using SwiftUI, Swift 5.5 and Xcode 13 (2022) — by Neil Smyth