Catalyst vs. SwiftUI for Building a New App
The problem I had with porting it to iOS in the first place became even more stark when it was “ported back” using Catalyst. UIKit is still not powerful enough to create a UI that feels great on the Mac. I can’t use NSColorWell and the built-in colour picker, and I can’t convert the rating picker to an NSPopUpButton, as you can’t combine both AppKit and UIKit in the same view hierarchy. This left the inspector looking rather forlorn and out of place.
[…]
I’m fully behind [SwiftUI] as the future of the platform, which is very much different to how I felt about Swift itself when it was first released. Unfortunately the thing SwiftUI does share with Swift 1.0 is that it’s very much a beta technology that is in no way ready for extensive use.
[…]
The biggest problem though is Swift itself. Having small, lightweight types that have a plethora of extensions that add functionality and protocol conformance is great way to write flexible and composable APIs, but it makes learning those APIs a nightmare. It’s bad enough for the Swift standard library, but SwiftUI takes it to a whole new level.
The lack of header files for documentation is a problem.
Honestly, after starting out with a lot of hope of going with either Catalyst or SwiftUI I’ve ended up being somewhat disillusioned with both of them. It seems silly, but the least friction I had getting an app that worked on both Mac and iPad was with the first attempt, where I had separate AppKit and UIKit apps. Yes, it requires more work and has less shared code, but it allows me to build for each platform with minimal frustration, and without having to hobble one app to allow for the other, as using Catalyst would require.
Previously:
Update (2019-06-27): Oluseyi Sonaiya:
Lots of languages provide excellent, browseable code interface documentation without using header files. That’s a red herring and false criticism of Swift.
I don’t want actual header files, just better tooling for the auto-generated Swift interfaces (which include the doc comments) so that they can serve the same documentation functions that headers did. A single 10,165-line file is hard to browse, search, and diff.
1 Comment RSS · Twitter
For swiftUI, we are closer to early alpha quality than beta (at least for macOS). There is so much basic functionalities that don’t work that I stopped trying to make toys project to learn it.