3 ms·
What might a cross-platform GUI app look like with Swift? I'm assuming SwiftUI can't be used? Regardless, I'll definitely be reaching for Swift for one-off scri
by prophesi 2y ago
What might a cross-platform GUI app look like with Swift? I'm assuming SwiftUI can't be used? Regardless, I'll definitely be reaching for Swift for one-off scripts. I've enjoyed the times I needed to use Swift for a React Native extension.
- easeout 2y agoIn iOS 18, there is now a SwiftUICore framework that's separate from SwiftUI, which I imagine consumes it. I don't see the new one on the documentation site. If that becomes public in a year or so, maybe you'd be able to replace one of the two frameworks to implement your own view system atop the attribute graph and data flow bits.
- saagarjha 2y agoIt's unlikely this will ever be made public. It's probably just there for organizational reasons, just like UIKit got made an umbrella framework for UIKitCore a while back.
- lukeh 2y agoThere's not a consistent story but there are a bunch of options, principally divided into wrappers around existing libraries (SwiftGTK [1], Qlift [2], LVGLSwift [3]) and SwiftUI workalikes (Tokamak [4], SwiftCrossUI [5], AdwaitaSwit [6], there are others too). After exploring most of these for my use case (something that needs to run on an "embedded" RPi CM4 as well as iOS), I wrote a Swift bridge/runner for Flutter [7] which is working well. That enables me to write the UI in Dart and the business logic in Swift. I looked at all the other options below (that's how I know about them, indeed [3] I wrote as part of my research), in the end I felt that none of them were at the time of investigating sufficiently mature to base a product around. [1] https://github.com/rhx/SwiftGtk https://github.com/rhx/SwiftGtk [2] https://github.com/Longhanks/qlift https://github.com/Longhanks/qlift [3] https://github.com/PADL/LVGLSwift https://github.com/PADL/LVGLSwift [4] https://github.com/TokamakUI/Tokamak https://github.com/TokamakUI/Tokamak [5] https://github.com/stackotter/swift-cross-ui https://github.com/stackotter/swift-cross-ui [6] https://github.com/AparokshaUI/adwaita-swift https://github.com/AparokshaUI/adwaita-swift [7] https://github.com/PADL/FlutterSwift https://github.com/PADL/FlutterSwift
- prophesi 2y agoLate to respond, but thank you for the in-depth response! Your research into the different options judged by your use-case is greatly appreciated.