Closed OmerFlame closed 2 years ago
Tokamak currently doesn't target any of the Apple platforms for GUI apps. While you can build it for macOS for generating static HTML with the HTML renderer, I don't think there's much sense in using Tokamak for GUI on those platforms, you should use SwiftUI directly instead. Does that answer your question?
Not exactly, I want to write UI just like in Tokamak but also bridge UIKit or AppKit with it, simply because I like UIKit/AppKit more than SwiftUI (Tokamak is close enough to SwiftUI in its syntax so I can call it that).
I'm still not sure I fully understand your use case. Could you clarify what exact platforms you are targeting?
I want to target my project for the web, but I to use things that are compatible with UIKit (through UIViewControllerRepresentable in order to make an element that it compatible with SwiftUI, which you are supporting according to you).
UIKit and AppKit are only available on Apple's platforms. If you have any code that depends on UIKit, you'll have to rewrite it for it to work in the browser. Because of this, UIViewRepresentable
and NSViewRepresentable
are of no use in Tokamak, since neither UIView
nor NSView
are available on non-Apple platforms, including WebAssembly.
We wouldn't even be able to express UIViewRepresentable
in Tokamak source code, because there's no UIView
implementation available for us.
Will there ever be any support for them? I saw something about AppKit support in one of the commits and pull requests, can anyone elaborate on that?