Thread
#compose
    Piotr Krzemiński

    Piotr Krzemiński

    10 months ago
    Hi! Does Compose support iOS? From what I see, it's just Android, desktop and web
    Filip Wiesner

    Filip Wiesner

    10 months ago
    Short answer: No 🙂 Other answers depend on what do you mean by "Compose". Compose Runtime? Compose UI?
    j

    jw

    10 months ago
    Compose Multiplatform* *but not really
    l

    Luke

    10 months ago
    Is it planned to bring Compose UI to iOS?
    Piotr Krzemiński

    Piotr Krzemiński

    10 months ago
    @Filip Wiesner I don't know the difference, my mental model is that Compose is one thing 😄 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
    Filip Wiesner

    Filip Wiesner

    10 months ago
    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
    , CompositionLocals,
    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)
    Piotr Krzemiński

    Piotr Krzemiński

    10 months ago
    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
    Filip Wiesner

    Filip Wiesner

    10 months ago
    I think there are some experiments with iOS Compose UI by JetBrains already 😉
    j

    jw

    10 months ago
    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.
    c

    CLOVIS

    10 months ago
    @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

    jw

    10 months ago
    Not yet, but it's built in its own repo with the goal of open sourcing.
    c

    CLOVIS

    10 months ago
    That's amazing! Do you have a (rough) estimate to when it'll become public?
    j

    jw

    10 months ago
    Maybe Spring.
    c

    CLOVIS

    10 months ago
    Ah, that's quite a long time away. Well, at least we know someone is seriously working on it 👍
    j

    jw

    10 months ago
    Two months of paternity leave starts in 16 days 😁
    Otherwise it might be sooner
    c

    CLOVIS

    10 months ago
    Oh! Congrats, that's a great reason 🤣
    mcpiroman

    mcpiroman

    10 months ago
    Sounds great, but does both your and JB's team knew of each others' affords?
    j

    jw

    10 months ago
    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

    CLOVIS

    10 months ago
    @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

    jw

    10 months ago
    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

    CLOVIS

    10 months ago
    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

    jw

    10 months ago
    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

    CLOVIS

    10 months ago
    Honestly that sounds like a dream come true.
    b

    Brian G

    10 months ago
    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).
    c

    CLOVIS

    10 months ago
    Both have their use, but I'm worried about interoperability between Compose for web DOM and Compose for web Canvas
    i

    ivano

    10 months ago
    Thanks. Finally one language for everything and no excuses to not focus on algo and math