https://kotlinlang.org logo
Join Slack
Powered by
# multiplatform
  • y

    ymaskin

    11/25/2025, 2:49 PM
    Hey, After upgrading the compose plugin in a CMP project, I'm getting this on iOS only. All the text fields are displaying random characters stuck on each other. Have you faced something similar? Any idea of how to solve this?
    a
    • 2
    • 7
  • m

    markturnip

    11/27/2025, 9:30 AM
    Anyone know of a Compose Multiplatform component for securing views from screen capture?
    v
    • 2
    • 4
  • d

    Damjan Miloshevski

    11/27/2025, 11:36 AM
    Hello, the Multiplatform app runs successfully on iPhone 13 and iOS 26.1 but I get this message in Android Studio, is this some kind of bug in the Studio itself or I need to update some plugins? I also have macOS Tahoe 26.1
    z
    • 2
    • 7
  • p

    pablisco

    11/27/2025, 12:40 PM
    Hey folks 👋 We are getting a very odd issue. We have a kmp project with android, desktop, ios and wasm. We also have something in our gradle that allows us to enable and disable targets to avoid compilation time (this would be a nice feature request btw) Anywho, when we have desktop and android, ksp doesn't generate code for kotlins.serialisation or Koin. However, if we have either of those enabled, they work ok. And, once compiled, if we have both android and desktop enabled together again, it works fine. Only has issues after a clean. Has anyone experienced something like this before?
    s
    • 2
    • 4
  • b

    Bhadra Vaghela

    11/27/2025, 1:36 PM
    Hey folks, I’m working on a Kotlin Multiplatform (KMP) Desktop project and I want to share it with others as a Windows executable (.exe) so it can run on any PC without needing Android Studio. Can anyone guide me on: • How to export or generate a .exe build from a KMP Desktop project.
    m
    m
    • 3
    • 4
  • b

    Brill

    11/27/2025, 2:46 PM
    Reading up on the experimental Compose UI tests at https://kotlinlang.org/docs/multiplatform/compose-test.html#what-s-next I'm thinking we really need to separate unit test from Ui Tests. Does anyone know the thought on combining them?
    o
    • 2
    • 7
  • s

    Stylianos Gakis

    11/27/2025, 3:23 PM
    I have an expect in my commonMain in a module with targets for jvm, android and iOS. Is there a way for me to make a sourceset which will combine both android and jvm, while still being able to use code in there which comes from jvm targets of libraries that I am using? More specifically, I want to use
    kotlinx.datetime.toJavaLocalDate
    which comes from inside kotlinx.datetime, which is defined in the jvm target. If I have the android and the jvm source sets separately, each one of them can import this function and just use it, no problem. However if I make a new sourceset like:
    Copy code
    applyDefaultHierarchyTemplate()
    val jvmAndAndroidMain by creating {
     dependsOn(commonMain.get())
    }
    jvmMain.get().dependsOn(jvmAndAndroidMain)
    androidMain.get().dependsOn(jvmAndAndroidMain)
    it is not resolved since as I understand it can't figure out that both those targets are supposed to be able to call the jvm target of the kotlinx.datetime library. Perhaps there might be a way to make this happen by not using the
    applyDefaultHierarchyTemplate
    and doing something more custom?
    o
    j
    • 3
    • 22
  • m

    Mikolaj

    11/27/2025, 6:06 PM
    The environment preflight check feature in KMP plugin for AS complains about empty emulators directory in Android SDK dir. If there is someone from JB reading - Maybe this requirement can be lifted? Emulator is not needed to start KMP app on physical device
    z
    • 2
    • 1
  • k

    Karen Frangulyan

    11/27/2025, 8:41 PM
    Hey! I am seeing a minor Preview issue: when running a preview on my physical device - an Action Bar is displayed on top, which partially covers the component I’m previewing. It’s a KMP/CMP project, multi-module, running a Preview from one of the KMP module’s commonMain, the main app’s theme has all the *.NoActionBar parents (the module’s manifest is empty though, no themes). Currently I just add top padding in preview composable to push stuff down, maybe someone knows a way to get rid of the action bar?
  • j

    Jack Boyce

    11/27/2025, 11:21 PM
    Can anyone recommend a KMP library for string resources? I have a Compose app where certain pieces of code need to be able to run in headless mode, which Compose resources doesn't support (CMP-8068). I see issue KT-63189 but am wondering if there's a 3rd party option. I only need simple retrieval of static strings.
    j
    • 2
    • 2
  • d

    Daria Voronina [JB]

    11/28/2025, 8:38 AM
    📣 Final call! The Kotlin Multiplatform Survey closes soon! Have you tried Compose Multiplatform for iOS, the new Kotlin Multiplatform IDE plugin, or Compose for Web? Tell us how these updates have changed your workflow — your feedback directly shapes what we build next. 👉 Take the survey
    K 2
  • m

    Michal Klimczak

    11/28/2025, 9:00 PM
    Why do I get
    w: Xcode Version Too High for Kotlin Gradle Plugin
    despite kotlin 2.2.20 🧵
    • 1
    • 2
  • j

    Jeremie D

    11/29/2025, 12:08 AM
    Ok… so i finally got as far as creating a kmp module, importing all my ktor and repositories over, as well as some stateholders and one viewmodel. Seems to work really well so far. The hope is to for now keep the views as Is but replace all the ios viewmodels with my kmp ones. I have some questions about lifecycle management- im using koin but will it know the right lifecycles for viewmodels in ios? How does that work? Also im curious to see preferred ways to observe changes on a vm- i saw some stuff from chat gpt where you can write a extension function to make the stateflow observable and post new values to the @published vars on ios. Is that the right thing? Is stateflow the correct way? Right now we were usng mutable state so id prefer to keep that if its good enough/possible
    p
    • 2
    • 2
  • m

    Michal Klimczak

    11/29/2025, 9:57 AM
    CMP + cocapods (google maps) + debug ios build + running from xcode = fail 🧵
    • 1
    • 1
  • m

    Melika

    11/29/2025, 1:30 PM
    Hi everyone, could you please help me with this question? Thank you🙏 https://stackoverflow.com/questions/79833275/how-to-avoid-duplicated-compose-multiplatform-resources-strings-drawables-ac
  • j

    Jonathan

    11/30/2025, 2:24 AM
    Is it possible to use a KMP library hosted on Maven Central inside of an iOS app without using Compose Multiplatform?
    p
    • 2
    • 1
  • s

    Soumen pal

    12/01/2025, 6:15 AM
    Hi do we have a Share components library for the the Compose multiplatform?
    m
    • 2
    • 5
  • b

    Bartosz Markowski

    12/01/2025, 10:04 AM
    Hi! I'm trying to run nav3 with newest compose multiplatform 1.10-beta02. It runs fine in apps, but i have problem with
    @Preview
    i get
    Copy code
    java.lang.IllegalStateException: No NavigationEventDispatcher was provided via LocalNavigationEventDispatcherOwner
      at androidx.navigationevent.compose.NavigationEventHandlerKt.NavigationEventHandler(NavigationEventHandler.kt:82)
      at androidx.navigationevent.compose.NavigationEventHandlerKt.NavigationBackHandler(NavigationEventHandler.kt:148)
      at androidx.navigation3.ui.NavDisplayKt__NavDisplayKt.NavDisplay(NavDisplay.kt:296)
      at androidx.navigation3.ui.NavDisplayKt.NavDisplay  at androidx.navigation3.ui.NavDisplayKt__NavDisplayKt.NavDisplay(NavDisplay.kt:208)
      at androidx.navigation3.ui.NavDisplayKt.NavDisplay  at lol.omg.bartek.zdrowko.AppKt$App$1$2.invoke(App.kt:63)
    I tested
    androidx.compose.ui.tooling.preview.Preview
    and
    import androidx.compose.ui.tooling.preview.Preview
    both gives same error. Some ideas how can I fix that
    p
    • 2
    • 9
  • t

    TheLegend

    12/01/2025, 11:40 AM
    Hi, I started a new Compose Multiplatform Project for iOS and Android. I come from an Android background, so I wanted to add Firebase, but I'm not sure if there is an official Firebase SDK for KMP/CMP? Is anyone here using Firebase or other tools for Analytics, Remote Config, Crash Report, Push Notifications, and such? Thanks.
    p
    f
    • 3
    • 3
  • t

    Tomáš Procházka

    12/01/2025, 10:41 PM
    Why it was deprecated please? https://kotlinlang.org/docs/multiplatform/whats-new-compose-110.html#deprecated-dependency-aliases It is one of the most time saving feature, there. You don't need to thing about all the possible KMM libraries, its maven coordinates, you just update the compose plugin and you have everything available, you can just use what you need 😞
    c
    e
    • 3
    • 4
  • i

    Ismail BENABDALLAH

    12/02/2025, 10:17 AM
    In a
    KMP/CMP
    project, I have a module that contains resources (images and strings) correctly placed in the
    composeResources
    folder. This module is declared as a library using the
    com.android.kotlin.multiplatform.library
    plugin. When I run the application, it crashes with the following error:
    Missing resource with path: composeResources/com.myaproject.resources/drawable/compose-multiplatform.xml
    However, if I replace the
    com.android.kotlin.multiplatform.library
    plugin with the
    com.android.library
    plugin, everything works fine. Do you have an explanation for this behavior? Could I be missing a specific configuration related to the KMP/CMP plugin or to resource handling in this setup?
    c
    m
    s
    • 4
    • 5
  • d

    Damjan Miloshevski

    12/02/2025, 1:07 PM
    Hi, has anyone used Koin with ViewModels in Compose Multiplatform? All examples and even Koin official docs say that dependency
    io.insert-koin:koin-compose-viewmodel
    should be in the
    commonMain
    source set but for some reason the build fails with the below error
    Copy code
    KMP Dependencies Resolution Failure
    Source set ‘appleMain’ couldn’t resolve dependencies for all target platforms
    Couldn’t resolve dependency ‘io.insert-koin:koin-compose-viewmodel’ in ‘appleMain’ for all target platforms.
    The dependency should target platforms: [iosArm64, iosSimulatorArm64]
    Unresolved platforms: [iosArm64, iosSimulatorArm64]
    Run the build with ‘--info’ for more details.
    Solution: Make sure you are using a dependency that targets all required platforms or move your dependency and relevant code to a more applicable source set: <https://kotl.in/57b2-source-set-dependencies>
    j
    • 2
    • 36
  • s

    Soumen pal

    12/02/2025, 1:22 PM
    Hi I was using This key events what I know is in Compose multiplatform the Keyboard is a soft keyboard and I cant Observe the Back or delete so How are we doing it especially for ios, any idea?
    Copy code
    .onKeyEvent { event ->
        println("Key pressed: ${event.key}")
        val didPressDelete = event.key == Key.Delete || event.key == Key.Backspace || event.key == Key.Back
        if (didPressDelete && number == null) {
            onKeyboardBack()
        }
        false
    },
  • h

    Harilal Sah Kanu

    12/02/2025, 1:43 PM
    👋 Hello, team!
  • j

    Jeremie D

    12/02/2025, 7:27 PM
    Is one of the limitations losing previews unless you use intellij IDE? im not againts it, just asking before i go beg the boss for money 😉 if there are ways to have a preview (even within the main kotlin project instead of within the shared module, thats fine, but right now as soon as i include a
    stringResource(Res.string.mystring)
    it won't generate the preview, maybe my config is just bad?
    m
    z
    y
    • 4
    • 8
  • g

    GeorgeS-Litesoft

    12/03/2025, 5:04 PM
    I'm building a shared library, based only on Kotlin "native" code, no JVM class references allowed (JVM used for test execution). gradle.properties:
    Copy code
    ksp.useKSP2=true
    build.gradle.kts:
    Copy code
    kotlin("jvm") version "2.2.0"
    id("com.google.devtools.ksp") version "2.2.20-2.0.4" // KSP for Kotlin 2.2.0
    ChatGPT just told me that default methods in interfaces is not supported in Kotlin "native" code. While I currently have one default method in an interface, I can remove it, if I need to, and then won't create any more! So, my question: Is ChatGPT wrong, and default methods in interfaces are supported?
    m
    • 2
    • 2
  • i

    iQQator

    12/03/2025, 10:49 PM
    Hello, is there any variant create different name for builded frameworks SharedDebug.xcframework, SharedRelease.xcframework for example ?
  • m

    Martin Feldsztejn

    12/04/2025, 1:08 AM
    Quick question about icon usage, I've searched through the channel and quite a bit of googling but haven't found an answer yet... I know that for `Composable`s we can use the
    Icons
    library to get most icons, this is all nice and well, but it runs into issues when some of the composables are implemented natively. In my case I have a Map, and I've had to implement an
    expect fun MapView()
    that has 3 `actual`s (Android with GoogleMaps Compose, WasmJs with a JsExternal bridge, and iOS using the native MapKit). What I'm now trying to do, is change the icons of the markers to anything but the default, but because the implementations are native, I obviously can't use
    Icons
    or even
    Res.
    . What is the suggested way to do this?
    b
    • 2
    • 4
  • j

    Jeremie D

    12/04/2025, 2:12 PM
    im down a shitty endless rabbit hole with ai .... is the shared buidl.gradle suppose to use "`androidLibrary` DSL or
    androidTarget
    + separate
    android {}
    block. The newer
    androidLibrary
    DSL has this instrumentation bug with resources. i keep switching back and forth, get issues, ai tells me to switch to the other one again... or the third option ive been trying to use is "com.android.kotlin.multiplatform.library"
  • a

    Andrew Stratton

    12/04/2025, 3:03 PM
    Does anyone know of how to script compose at run time? I would like to use this for a Visual Block editor, example shown below. Note that I have this working at present using vanilla DHtml browser with dragulas.js. I want the users to be able to drag and drop blocks, reorder them, and also change the menu/textfield, etc. The components would also be used to generate (javascript) code to execute (this would likely run in a new window). Here is sample block code - which I would like to use Compose for instead - I am certain this can be massively reduced
    Copy code
    <div data-quando-block-type="media-text" class="quando-block"
        data-quando-javascript="quando.text($(eq$,${txtval}$,input$,'${text}'$,${txtval})$,${append},${newline})">
        <div class="quando-left quando-media"></div>
        <div class="quando-right">
            <div class="quando-row quando-media">
                <span class="iconify">abc</span>
                <select data-quando-name="append" class='quando-toggle'>
                    <option value="false">Show</option>
                    <option value="true">Add</option>
                </select>
                Text
                <span data-quando-toggle='txtval=input'>
                    "<input data-quando-name="text" type="text" value=""
                        data-quando-encode='normal' />"
                </span>
                <select data-quando-name='newline' class='quando-toggle'>
                    <option value='false'> </option>
                    <option value='true'>⤶</option>
                </select>
    <!-- + options removed -->
            </div>
        </div>
    </div>
    At present I just paste the html into the relevant div - but this won't work for compose. Hot reload 'could' do this but is an IDE feature - so not suitable for separate builds. Note that there are 200+ blocks at present, so a switch statement would be a maintenance nightmare...I could put them all in a list and iterate through - but that seems smelly... Thank you in advance - Andy