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

    Piotr Krzemiński

    11/18/2025, 8:17 PM
    can I ask someone with a Windows machine to try reproducing the issue from Wasm tests on Windows sometimes cannot find kotlin-test-karma-runner?
  • j

    Jeremie D

    11/18/2025, 10:26 PM
    ps: migrating from retrofit to ktor looked like this for me: 😩
    👀 3
    s
    • 2
    • 4
  • s

    super

    11/19/2025, 10:23 AM
    👋 Hello, team!
  • e

    Ejaz

    11/19/2025, 10:55 AM
    Hi, has anyone found a way to play videos on the web target yet?? using cmp
    p
    c
    • 3
    • 7
  • o

    Ohiorenua Aigboje

    11/19/2025, 2:26 PM
    I ask this question and I have found a fix. So if anyone is looking for this fix. https://kotlinlang.org/docs/multiplatform/multiplatform-advanced-project-structure.html#aligning-versions-of-common-dependencies-across-source-sets val mobileMain by creating { dependsOn(commonMain.get()) androidMain.get().dependsOn(this) iosMain.get().dependsOn(this) dependencies { // implement here } } val nonMobileMain by creating { dependsOn(commonMain.get()) jvmMain.get().dependsOn(this) wasmJsMain.get().dependsOn(this) dependencies { // implement here } }
    c
    • 2
    • 2
  • a

    Andrea Falcone

    11/19/2025, 4:27 PM
    Just a reminder about the Jetbrains KMP Survey (which closes Nov 28). Hope you can share feedback about what is and isn't working so that it can be improved: https://surveys.jetbrains.com/s3/KMP-Survey-2025-G
    K 2
  • b

    Bhadra Vaghela

    11/20/2025, 5:15 AM
    Hello everyone, I have a doubt. I am creating a desktop application using KMP, and I need to connect Firebase to my project. Can anyone suggest how I can integrate Firebase with a KMP desktop project?
    e
    • 2
    • 1
  • s

    Stanislav Tsyganov

    11/20/2025, 10:46 AM
    📣 Tried Kotlin Multiplatform for iOS or Android recently? We’d love to talk to you! We’re conducting one-on-one interviews to learn about your first impressions and experiences using KMP for mobile targets. Your insights will help us improve the Kotlin Multiplatform experience for developers like you. 🕐 Interview length: 60 minutes 🎁 As a thank-you, you’ll receive either a JetBrains All Products Pack (one-year subscription) or a USD 100 Amazon Gift Card. 👉 Sign up for the session here 👈
    🔥 4
  • s

    Shashank

    11/20/2025, 12:15 PM
    Hello everyone, I have been working on a KMP project, and it is growing in size, requiring me to spend a significant amount of time on the macOS runner in my CI. Which is very expensive. I'm not sure if I can achieve this, but my thought is to build shared code on Linux Runner and then cache it to use on macOS runner. This will save a significant amount of time.
    Copy code
    - name: Build Shared iOS Framework for Xcode
            run: ./gradlew shared:embedAndSignAppleFrameworkForXcode
          - name: Upload Shared Framework for iOS
            uses: actions/upload-artifact@v4
            with:
              name: ios-shared-framework
              path: shared/build/xcode-frameworks/
    I want something like above, but the problem is I can not run ./gradlew shared:embedAndSignAppleFrameworkForXcode on the Linux runner. So is there an alternative to do this, or is it something not possible?
    j
    • 2
    • 3
  • g

    galex

    11/21/2025, 5:25 AM
    Hello, does someone have an example how to make the
    AppBackStack
    of the nav3 conditional case support state restoration, meaning making a valid Saver for it?
  • n

    Nathan Fallet

    11/21/2025, 4:19 PM
    Any idea why Kotlin Uuid type is not JsExport-ed?
    t
    h
    a
    • 4
    • 4
  • n

    Nathan Fallet

    11/21/2025, 4:20 PM
    (Using it from js is “any” which is not ideal)
  • f

    François

    11/21/2025, 6:06 PM
    Hello, spmForKmp’s user; I’m going to add a new way for configuring the package. I’m looking for feedback! Thanks
    ✅ 1
  • d

    David Otasek

    11/21/2025, 10:01 PM
    Hi everyone, I have a 3-year old multiplatform project (jvm, js, ktor, react, redux components) that I'm having some difficulty trying to update to newer multiplatform versions. I tried to follow the commit history on the [jvm-js-fullstack](https://github.com/kotlin-hands-on/jvm-js-fullstack/tree/final) example to get to at least the 1.0.0-pre.561 version of the kotlin wrappers. That got my project to build, and the server side appears to work as intended, but the react and redux front end of it is failing in the browser. My attempt at the update can be seen here: https://github.com/hapifhir/org.hl7.fhir.validator-wrapper/compare/do-20251121-bump-kotlin-multiplatform The issues stem from redux from what I can tell.
    The slice reducer for key "localizationSlice" returned undefined during initialization.
    is what I can see in the browser console. I can get rid of that exception with some changes, but that leads to other runtime errors and I can't tell if it's actually an improvement. If anyone has any ideas on the path I should take, or suggestions on more appropriate places to ask for help, please let me know.
  • w

    Wayne

    11/21/2025, 10:42 PM
    Hi folks, I'm working on a Compose Multiplatform project that mixes native and compose UIs. I'm using a NativeViewFactory pattern where some views are defined in an interface and implemented in Swift, which is then injected. This is possible because the entrypoint of the app is Swift, where it can define an implementation and pass it into the Kotlin side. I'm running into a problem with testing, where I am testing Composables in a more isolated fashion, and more importantly, from a Kotlin entrypoint (in commonTest). It's a composeUiTest. At this point there is no injected NativeViewFactory, so the test can't proceed on iOS. Is there an existing pattern for testing Composables with Swift views embedded within? Seems like it would require a way to call Swift code before calling the composable. Or is there another method? Thanks!
    • 1
    • 1
  • p

    Phodal

    11/22/2025, 5:17 AM
    Hi folks, I’m using compose-webview-multiplatform to embed a WebView in my application. However, in production it still requires downloading KCEF, which is difficult for some users. I’m trying to find a way to bundle it with the JetBrains Runtime (JBR), but I haven’t found any useful resources or documentation. Does anyone have suggestions for alternative WebView solutions that can be shipped without requiring users to download KCEF?
    👀 1
  • s

    Sajid Ali

    11/22/2025, 8:14 AM
    Hey everyone, I am trying to bundle libvlc as a kotlin multiplatform library but when I use it in swift I get "Framework VLCKit not found" error.
    Copy code
    plugins {
        alias(libs.plugins.android.kotlin.multiplatform.library)
        alias(libs.plugins.kotlinMultiplatform)
        alias(libs.plugins.kotlinCocoapods)
    }
    
    kotlin {
        jvmToolchain(17)
    
        androidLibrary {
            namespace = "dev.sajidali.onplayer.vlc"
            compileSdk = 35
            minSdk = 21
        }
    
        jvm("desktop")
    
        val xcfName = "VlcKit"
        listOf(
            iosSimulatorArm64(),
            iosArm64(),
            iosX64(),
            tvosX64(),
            tvosArm64(),
            tvosSimulatorArm64(),
    //        macosArm64(),
    //        macosX64()
        ).forEach {
            it.binaries.framework {
                baseName = xcfName
    //            linkerOpts.add("-framework")
    //            linkerOpts.add("VLCKit")
                isStatic = false
            }
        }
    
        cocoapods {
            summary = "Shared LibVLC Implementaion"
            homepage = ""
            version = "1.0"
            ios.deploymentTarget = "18.0"
            tvos.deploymentTarget = "18.0"
    //        osx.deploymentTarget = "15.0"
    
            framework {
                isStatic = false
                baseName = xcfName
            }
    
            pod("VLCKit") {
                version = "4.0.0a16"
                extraOpts += listOf("-compiler-option", "-fmodules")
            }
        }
    
        sourceSets {
            commonMain {
                dependencies {
                    api(project(":oneplayer"))  // Consider making this api if you want to export it too
                    implementation(libs.kermit)
                }
            }
    
            androidMain {
                dependencies {
                    implementation(libs.core.ktx)
                    implementation(libs.appcompat)
                    implementation(libs.constraintlayout)
                    // Add LibVLC dependency
    //                implementation(libs.libvlc.all)
                }
            }
    
            appleMain {
                dependencies {
                    // Any iOS-specific dependencies
                }
            }
        }
    }
    This is my gradle config. What am I doing wrong?
    f
    • 2
    • 1
  • e

    electrolobzik

    11/22/2025, 9:01 PM
    Hey everyone, Is it still expected that debugging a suspend function on iOS (in both Xcode and Android Studio) doesn't show the local variables and method parameters? I've set a breakpoint inside suspend function and it stops but doesn't show anything, and if I try to add a watch for the method parameter it says: "error: user expression 1311: use of undeclared identifier". Am I doing something wrong or this limitation is still there?
    t
    • 2
    • 2
  • r

    RANJAN

    11/23/2025, 8:39 PM
    Hey everyone. Earlier when we created KMP app with shared UI logic too. It would have provided
    composeApp
    and
    shared
    modules. and shared would be containing logic till domain layer. But after migrating my application to domain and started composeApp module with UI and viewmodel I realised in composeApp don't have way for viewmodel to be initialised via
    koin
    .(If have way then please let me know) But now when we create new project using KMP plugin it do not provide shared module instead official documentation suggest to put shared logics in same module too. My question: is KMP really stable. without knowing it changed a lot in 4-5 months for me. Can it be trusted.
    m
    • 2
    • 3
  • c

    Colton Idle

    11/24/2025, 2:01 AM
    kotlin docs state "To make the update process smoother in the long term, we recommend changing your project structure to isolate AGP usage to a dedicated Android module." But when you download a new project from https://kmp.new it doesn't have a dedicated android module (but it does have a dedicated ios module?) should kmp.new template project be updated?
    z
    e
    e
    • 4
    • 6
  • b

    Bhadra Vaghela

    11/24/2025, 5:35 AM
    I’m facing an issue with my KMP project - it’s not building in Android Studio. I’m continuously getting an error, and I’ve attached the log/error screenshot for your reference. Please have a look and let me know what might be causing this or how I can resolve it. Thanks!
    t
    • 2
    • 3
  • f

    François-Xavier Beuvry

    11/24/2025, 9:02 AM
    Hello everyone! We are currently developing a KMP library targeting both Android and iOS, with @Aurélien L.M. Our main challenge is with the data type mapping for iOS. • When exposing integer types from common Kotlin code to the iOS side, they are mapped to the standard Objective-C types (e.g.,
    Int16
    ,
    Int32
    ,
    Int64
    , etc.). • However, the iOS developers in my company are primarily using Swift, and they strongly prefer to use the standard Swift
    Int
    (which, on modern 64-bit architectures, is effectively a 64-bit integer,
    Int64
    ). They are reluctant to deal with the specific Objective-C-derived integer types (
    Int32
    ,
    Int64
    , etc.) as it breaks Swift idiomatic usage and requires constant casting. I initially suggested exposing the numbers as
    NSNumber
    , but this was also rejected for similar reasons (non-idiomatic Swift). My question is: Is there an established, idiomatic way (a KMP feature, a specific wrapper, a build setting, or a best practice) to make KMP expose Kotlin integer types (especially
    Int
    and
    Long
    ) in a way that maps directly to the standard Swift
    Int
    type, or at least something closer to it than the current Obj-C derived types? I suspect this question has come up before, but I haven't been able to find a clear solution or discussion thread. Any advice or pointer would be greatly appreciated! Thanks!
    s
    e
    e
    • 4
    • 4
  • g

    Gustavo E Bonilla

    11/24/2025, 10:52 AM
    Hello everyone, Currently in our team we are building a KMP app using the Kotlin code for the shared logic, but each platform handling its own ui (✏️ & swift) independently. Right now we are facing an issue when we want to debug the share code in XCode a problem of unsymbolicated crash reports due to the dsym files are missing. Currently we are following the approach suggested here, but still no dsym files are being generated. Has someone already faced this? or have a different approach that will fulfill this requirement? Thanks in advance 🙂 .
  • a

    Alexandru Caraus

    11/24/2025, 11:05 AM
    Hello Everyone, I want to create a small plugin in buildSrc for Kotlin Multiplatform, so that when I apply my custom configuration it would build selectively the source sets. Lets say I am on linux, and have iosMain target, I want to disable this target in the whole project with a flag. Do you have any ideas where I could start?
    z
    • 2
    • 2
  • s

    Smoothie

    11/24/2025, 3:11 PM
    Hello, I'm still looking for any solution to this, it make checking logs really exhausting. iOS logs on Android Studio or Intelij are double line return
    • 1
    • 1
  • d

    Dumitru Preguza

    11/24/2025, 3:46 PM
    Is there any lib to make the functionality "Share with another app" multiplatform on mobile ?
    h
    m
    • 3
    • 4
  • l

    liverm0r

    11/24/2025, 10:15 PM
    Hey, does anyone know if it possible to have the android like compose preview with desktop only KMP app? I tried
    Compose Multiplatform for Desktop IDE support
    but it doesn't allow to click on a view and move cursor into the code.
    z
    • 2
    • 1
  • k

    Karen Frangulyan

    11/25/2025, 3:29 AM
    Hey! Can it happen that something from “regular” Jetpack Compose doesn’t end up in “multiplatform” Compose? For example, compose foundation added
    plus
    and
    minus
    operators for
    PaddingValues
    in 1.10.0-alpha05 , however, CMP
    1.10.0-beta02
    (which is based on jetpack compose of the same version) doesn’t seem to have those operators.
    j
    • 2
    • 2
  • s

    Simileoluwa Aluko

    11/25/2025, 6:44 AM
    Hey here, I had started building a compose multiplatform app targeting Android & iOS, then decided to try compose hot reload to see if it'd save me time refreshing the app. After setting it up, and making changes in commonMain (most of my code live here) the changes don't seem to appear on the desktop app automatically or immediately. Am I missing something or its only changes to jvmMain that'd appear immediately on the desktop app?
    z
    • 2
    • 18
  • 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?