Is it possible to write an iOS app with Compose wh...
# compose-ios
m
Is it possible to write an iOS app with Compose where the GUI is done natively with SwiftUI but all application graphics is done via the Compose Canvas? I.e., is it possible to mix SwiftUI with Compose Canvas rendering?
a
Nah, but you could create a Kotlin MPP library to host all of your logic and then write android UI in Compose & iOS UI in SwiftUI
d
☝️ Have done this in production
m
@Anthony Martin Well, I think that wouldn’t help me much. If most of my logic is around creating graphics I would have to create an abstract canvas interface that I could then use in Compose or SwiftUI and this is exactly what I would like to avoid because it would be an enormous amount of work.
d
Yes the latter, deployed a production App on iOS with SwiftUI and on Android with Compose, sharing all other logic. That may be less helpful to know for you though; I'm not aware of a way to mix the two on the same screen.
Multiple iOS Windows may work technically but be of limited practical use.
l
View interop could potentially be part of the stable release of #compose-ios, since it’s in the other platforms. Keep in mind #compose-ios is not done yet.
I remember there being a commit when they added keyboard support that removed the line in SkikoUIView that sets the frame to match the window size. It may be possible to use a SkikoUIView similar to ComposeView on Android. I haven’t tested this out yet.
m
Thank you all. I’ll keep an eye on that.
d
We plan to make samples to interop with UIKit and SwiftUI. But at current time, we have another priorities.
a
Hoping for an alpha release soon 👀
d
For now we are doing better TextField's experience. And next we have a lot of another features, need to be implemented.
l
I wrote a library a while back that could render a UIView onto an iOS composable (can’t promise efficiency, and it didn’t handle re-rendering well at the time). I made a little bit of progress before shifting to another side project. Is there anything I could contribute to potentially speed up platform view integration?
a
Do you have a roadmap for compose at all? Be interesting to see where compose for iOS fits in and expected alpha builds that we can play around with.
d
@Landry Norris It's cool, if someone can prepare little samples to interop with SwiftUI and UIKit. I think, very basic samples already can help's.
@Anthony Martin We don't have public roadmap yet, because it's hard to predict current speed of development. But we have the desire and support of the community 🙂
h
@Dima Avdeev I think, many people do support compose and would like to contribute more often. So it would be great if the roadmap could be public and you would have some better process/feedback for PRs to accelerate Compose!
d
@hfhbd Yeah, thanks for advice! We will try to make this process better!