App development sucks right now. And to be honest, it’s always sucked, but we didn’t know how much it sucked until recently.
Let’s talk about SwiftUI
If you’re reading this, you know what SwiftUI is. SwiftUI is Apple’s newest app development framework.
All you need to know about SwiftUI is that you can do a lot of stuff with a lot less code than before. That’s a great thing for developers on Apple platforms, but an awful thing for everybody else (including users).
Ever since I tried out SwiftUI, I have lost all motivation to use anything else. I have many apps that I would love to port to Android, Windows, and the web. But, making apps for those platforms is completely awful.
Android is getting there in terms of DX with Compose, but Compose feels unfinished and is missing several important features, requiring devs to have to use older, outdated APIs anyways. Also, async/await in Kotlin is so weird! Why does every programming language have to use some weird, strange async/await pattern. This isn’t even just a Kotlin issue. Swift has the same issue! What in the name of god is a MainActor? ModelActor? Huh?!
Windows has like 6+ different frameworks for making apps, and they’re all somehow terrible. It feels like Microsoft constantly realizes “oh no this SDK sucks” and so they start to make a new one, but the new one just ends up having the same problems as the old ones for some reason.
Web development is just completely terrible. I hate having to define layout myself. It feels like every time I try to do something on the web that would take 2 lines of code elsewhere, there ends up being 7 different ways to do it on the web and each of them don’t quite produce what I want. Javascript is also terrible. Typescript is marginally less terrible, but it’s still awful.
But, none of these were issues before. These were all the status-quo. It was expected that, on mobile, you would have to define layout yourself, and make your own components, and manage state yourself. But SwiftUI changed this. Our expectations collectively changed when we saw what SwiftUI could do, but no development frameworks for other platforms have managed to meet those expectations (except for a few).
WIP
There are a few frameworks that try to recreate SwiftUI for other platforms:
Skip (Android) is a semi-open-source project that aims to bring SwiftUI to Android in a very unique way. You would assume that Skip compiles your Swift code down to machine code for Android. It doesn’t do that! Instead, Skip transpiles your Swift and SwiftUI code into Kotlin and Compose code. This has several advantages. First and foremost, your Skip app is truly native on Android. After transpilation, it is literally just an Android app, and is almost indistinguishable from a regular Android app. There is one issue, though. What happens if a SwiftUI API doesn’t exist in Kotlin or Compose? Skip has run into that issue a few times, and their solution seems to be porting the API to Android. Also, Skip is very unfinished and, in my experience, very unstable. Very exciting project, though!
SwiftCrossUI (Desktop) aims to bring SwiftUI to macOS, Linux, and Windows. I don’t know much about this project to be honest, but it seems very promising! Recently, it was updated with a
WinUIBackend
that lets you write SwiftUI code which uses Windows’ WinUI/WinAppSDK Swift API from The Browser Company.TokamakUI (Web and maybe Linux?) bring SwiftUI to the web. There’s not much more I can say about it, honestly! It is based on SwiftWebUI, but has better support and is relatively more production-ready. Definitely still not prod-ready, though. Also, it hasn’t been updated in a year. Anybody wanna help revive this? I’m down!
Anyways
I could keep writing more on this, but I think I’ve mostly gotten my point across and it is 10 P.M. as of writing this. I am tired. Those are my thoughts, thanks for listening.