Hi! Does Compose support iOS? From what I see, it'...
# compose
p
Hi! Does Compose support iOS? From what I see, it's just Android, desktop and web
🚫 7
🤞 2
f
Short answer: No 🙂 Other answers depend on what do you mean by "Compose". Compose Runtime? Compose UI?
☝️ 2
j
Compose Multiplatform* *but not really
😄 2
l
Is it planned to bring Compose UI to iOS?
👍 1
p
@Filip Wiesner I don't know the difference, my mental model is that Compose is one thing :D what I exactly want to do is to use Compose API with Material components
Anyway, as Jake pointed out, it's a big surprise to me that something related to Mutliplarform and Kotlin doesn't support iOS. KMM does
f
If you want to use the whole Compose than the answer is "no". There is no official support for it. By Compose Runtime I mean the (non-UI) Compose framework that includes things like
State
, `CompositionLocal`s,
remember { }
etc. The reason it's different is that Runtime is multiplatform and UI is platform specific*.* (And there are several "UI frameworks" built on Compose Runtime)
🙏 1
p
Thanks! I'll check how far I can go with this knowledge, and I'll probably also file a feature request to have full iOS support, so that we can have platform-agnostic code that uses Material UI
f
I think there are some experiments with iOS Compose UI by JetBrains already 😉
j
We have had Compose working on iOS for about 5 months now targeting UIKit. Our usage is even more complicated because it's truly multiplatform in that it works on every platform Kotlin supports and it allows you to bring the UI toolkit implementation while still code sharing the presenter-like logic that Compose lets you write.
👍 2
👏🏼 3
👏 4
c
@jw is that publicly available? I'm very interested how you managed to keep all the Compose goodness as well as allowing platform-specific UIs (I'm currently struggling through trying to have a multiplatform Modifier implementation)
j
Not yet, but it's built in its own repo with the goal of open sourcing.
👍 2
🚀 1
c
That's amazing! Do you have a (rough) estimate to when it'll become public?
j
Maybe Spring.
🤞 12
c
Ah, that's quite a long time away. Well, at least we know someone is seriously working on it 👍
j
Two months of paternity leave starts in 16 days 😁
👍 5
🎉 8
💯 2
Otherwise it might be sooner
c
Oh! Congrats, that's a great reason 🤣
m
Sounds great, but does both your and JB's team knew of each others' affords?
j
Well they helped us get Compose running on iOS ~6 months ago. But they seem to want to port Compose UI to native. And we want nothing to do with Compose UI on JVM, web, or native platforms.
c
@jw does that mean that your version does multiplatform without Compose UI (eg. Reimplemented all composables for these platfoms)? If so, and it can still easily do multiplatform, that sounds amazing
j
We have our own set of composables and rendering, yes. But they are shared across all platforms it's just not necessarily the same rendering on all platforms
c
I see, same API but different implementation. Are the different implementations pixel-perfectly identical, or are you more following a ‘it must broadly look the same but each platform is allowed small differences so it fits better with the overall system look’ style?
I really wish the latter was possible, but I'm worried there's a conflict between ‘multiplatform UI code’ and ‘enough control that it feels like a native app everywhere’. I'd be very impressed if both of these goals can be reached by the same library.
j
The implementations do not look the same. We only care about consistency insofar as the design system commands. Beyond that, controls like switches are themed with our brand but match the look and feel of the platform.
c
Honestly that sounds like a dream come true.
👌 1
b
I think both options have their place. Perhaps JB is interested in both for iOS as well?
I like how they are aproaching Compose Web, JetBrains is supporting web components (html/css) but also working on a multiplatform-canvas alternative using Compose UI. Both have their use...
Having both options on iOS would be great, too (Composable UIKit + Compose UI).
👍 2
c
Both have their use, but I'm worried about interoperability between Compose for web DOM and Compose for web Canvas
i
Thanks. Finally one language for everything and no excuses to not focus on algo and math