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

    Soumen pal

    08/21/2025, 9:39 AM
    Hi developers, Do we have any way to have google maps in Compose Multiplatform other then via cocoapods and making the package available in iosMain so that I can write it in kotlin code. Cinterop wont work beacuse the GoogleMapsIOS through SPM moves the dependencies and creates a moving target problem. Do we have any solutions?
    t
    j
    a
    • 4
    • 6
  • w

    wiktor

    08/21/2025, 1:11 PM
    Hi! I’m experimenting with wasmJs and I remember seeing a tip here about reducing build time, but I can’t find it now. Is there a way to do that?
    • 1
    • 1
  • a

    Ahmet Bozkan

    08/21/2025, 9:45 PM
    Hey guys, what is your general approach on ViewModels on your kmp projects with native ui? I saw this library where Jetbrains primarily uses in their sample kmp projects to have shared ViewModel but not sure how optimal this is cuz not sure how lifecycle on android side is handled: https://github.com/rickclephas/KMP-ObservableViewModel . Would definitely make things easier but does anyone have experience with it on bigger projects? or are you commonly use native viewmodel on android and similar native approach on ios side?
    r
    g
    • 3
    • 2
  • a

    Ajay Venugopal

    08/21/2025, 10:38 PM
    Hey Guys, Im new to KMP, Can someone please advice the solution, Im having trouble in consuming the dependencies in commonMain module. But i can to do that in androidMain. What could be the reason for this
    Copy code
    commonMain.dependencies {
        implementation(files("libs/shared-debug.aar"))
    }
    Thanks in advance
    t
    d
    • 3
    • 2
  • s

    Sai Charan

    08/22/2025, 3:01 AM
    I am making a app that uses googleSignIn package in swift. So when i added that package and ran the application i am getting ld: framework 'GoogleSignIn' not found error. Can any one please help
  • m

    Meet

    08/22/2025, 4:17 AM
    Hello I'm trying to make a desktop app using compose multiplatform which works on mac, win and linux. However, I need to call the OS specific APIs. if possible any github example or any article available please send me here. Thanks in advance
    r
    • 2
    • 10
  • a

    Angel Solis

    08/22/2025, 5:39 AM
    Hi, I just created a new project using the KMP Wizard and in Android Studio keeps throwing the following error that it cannot find the .xcodeproj file. If I gradle sync again it goes away but after a couple minutes shows again. Everything works fine in xcode if i build the iosApp project. Im running
    Android Studio Narwhal Feature Drop | 2025.1.2 Patch 1
    Is there something that I'm missing?
    y
    • 2
    • 4
  • a

    Abu Sufyan

    08/22/2025, 6:58 AM
    Hi I have a project with SwiftUI and i use moko resources for using shared resources like string, fonts, images etc. I am facing issue when I placed them in iOS like type mismatch and something like that anyone can help me please I am using 0.25 version of moko
  • p

    ptsiogas

    08/22/2025, 2:07 PM
    Hi everyone, I’m looking for an official or community-supported solution for implementing an encrypted database in a KMM project that works on both Android and iOS, ideally using shared/common code. From what I’ve seen, SQLDelight appears to support this to some extent, but I haven’t been able to find any up-to-date or complete guides for setting it up across both platforms, especially with encryption. If anyone has recommendations, working examples, or best practices for this setup, I’d really appreciate it! Thanks in advance!
    r
    c
    +2
    • 5
    • 7
  • d

    Deep Patel

    08/24/2025, 7:27 AM
    What are people using for continuous deployment with their KMP apps?
    d
    c
    b
    • 4
    • 6
  • f

    Finn Ebeling

    08/24/2025, 9:02 AM
    I have a question about the compatibility of different versions of the Kotlin Multiplatform Gradle plugin: Assuming I want to use a KMP library in my KMP project. The KMP library uses version 1.9.22 and my KMP project uses version 2.2.10 of the Kotlin Multiplatform Gradle plugin. There seems to be no issues in doing so but I wonder whether there could be any issues and if that's possible how I can find out about them. I could also imagine that this is not just specific to KMP but applies to the compatibility of different Kotlin versions in general. Any insights are appreciated!
    t
    • 2
    • 5
  • t

    Tlaster

    08/25/2025, 3:29 AM
    Does anyone have the issue where
    com.android.kotlin.multiplatform.library
    does not support custom group in
    applyDefaultHierarchyTemplate
    ? more in thread.
    t
    • 2
    • 3
  • s

    Slackbot

    08/25/2025, 10:44 AM
    This message was deleted.
    s
    • 2
    • 1
  • i

    inickqc

    08/25/2025, 12:13 PM
    Hello, I am trying to update Kotlin Multiplatform 0.9-252.23892-IJ_CE-521 on windows. I tried every version of the plugin and still get error message about A required privilege is not held by the client. Any help would be appreciated. Do i have to downgrade everything ?
    t
    a
    +2
    • 5
    • 7
  • w

    wisha khn

    08/25/2025, 1:50 PM
    Hey, anyone integrated Braze sdk in KMP??
  • a

    Aman Shaikh

    08/25/2025, 7:08 PM
    Hi everyone 👋 I am willing to buy a course to learn kotlin multiplatform, can anyone please recommend if there is any structured and quality course available out there. Thanks! 🙏 Cc: @Orlando
    🙌 2
    plus one 1
    🤝 1
    K 1
    ☕ 1
    u
    s
    • 3
    • 5
  • a

    Abdo

    08/26/2025, 12:49 PM
    Hi everyone! 👋 Looking for recommendations on QR code libraries (generate/scan) for Kotlin Multiplatform (Android + iOS). Thanks! 🙏
    m
    w
    • 3
    • 2
  • j

    JoniAranguri

    08/26/2025, 2:50 PM
    Hi everyone! 👋 I am using Android Studio to build a KMP app for Android and iOS, but I have observed a weird behavior recently: • Android target is not visible when I just open the project. • To make it visible I have to sync the build.gradle file • After sync, Android target become visible and I am able to click run button. • But a few seconds later, the Android target disappears again. Does anyone have experienced something similar? I am not really sure if the issue is on KMP setup, on Android Studio or in both sides.
    kmp-android-dissapear.mov
    t
    p
    • 3
    • 2
  • a

    Abubakkar

    08/26/2025, 3:11 PM
    Hi everyone, Is there currently any official or recommended Kotlin Multiplatform support for implementing in-app purchases across Android, iOS, Desktop, and Web? If not, could you suggest community-maintained libraries or best practices for handling cross-platform in-app purchases?
    p
    • 2
    • 2
  • k

    krkoo3

    08/26/2025, 5:07 PM
    Hi guys
    🚫 1
  • k

    krkoo3

    08/26/2025, 5:26 PM
    I have a question, is there a better database than Room database?
    p
    j
    a
    • 4
    • 9
  • a

    Abhishek Agarwal

    08/26/2025, 6:41 PM
    Hi, I'm working on a KMP project and have an issue with platform-specific code. My iOS code uses
    NSBundle
    to read custom keys like
    BASE_URL
    and
    IS_DEBUG
    from
    Info.plist
    , which works fine when I build with Xcode. However, when I run the same code via Android Studio, those keys return null.
    Copy code
    //iosMain inside actual class
    private fun getBaseUrlFromBundle(): String { 
    val bundle = NSBundle.Companion.mainBundle 
    val baseUrl = bundle.objectForInfoDictionaryKey("BASE_URL") as? String 
    return baseUrl ?: "" 
    } 
    
    private fun getEnvironmentFromBundle(): Environment { 
    val bundle = NSBundle.Companion.mainBundle 
    val isDebug = bundle.objectForInfoDictionaryKey("IS_DEBUG") as? String 
    return if (isDebug?.lowercase() == "true") Environment.STAGE else Environment.PROD 
    }
  • u

    박상혁

    08/27/2025, 2:20 AM
    Hi everyone, I have a question about dependency propagation in Kotlin Multiplatform. I have two modules: A and B. • Module A adds the Room library with implementation("androidx.roomroom runtime...") in commonMain. • Module B depends on A with implementation(project(":A")). My expectation: Since A uses implementation, Room should not be exposed to B. Therefore, B should not be able to reference Room classes unless A declares them with api or B adds Room explicitly. But what I see in practice: In commonMain, B can still use Room classes without adding the Room dependency. It looks like the dependency is leaking from A even though it’s declared as implementation. What’s interesting is that this only happens with commonMain dependencies. When the dependency is added in androidMain, it works as expected: B cannot see Room unless it declares it itself. Questions: • Is this behavior expected for commonMain dependencies? • Could this be an IDE/classpath leak rather than a stable Gradle contract? • What is the recommended way to avoid this and ensure B cannot accidentally depend on Room?
    e
    • 2
    • 2
  • v

    Vaibhav Jaiswal

    08/27/2025, 6:40 AM
    Hi everyone, i am thinking to build a KMP project targeting web and android Planning to go with Shared Business Logic + Native UI (Jetpack Compose/React JS) I have a few questions, can anyone help me out ? • For web, should i target kotlin/js or kotlin/wasm? • I want to keep KMP, Android and Web as separate projects with separate repositories, how will this work? Will kmp project become a artifact on maven, which is then consumed by android and a NPM dependency which is consumed by the Frontend ?
    a
    • 2
    • 1
  • k

    katokay

    08/27/2025, 2:23 PM
    Hi everyone, For the life of me I cannot figure out why my library's CI build keeps failing on the commonizeCInterop portion of the build on github actions. Everything works locally, and runs successfully inside my sample project but the build always fails with something like
    Error: Exception in thread "main" java.lang.IllegalStateException: Unresolved classifier: platform/WatchConnectivity/WCSession
    for which I've played whack-a-mole on countless ways to resolve the issue. For context, it uses swiftklib plugin to help with the HealthKit specific dependencies. I've even gone so far as replacing that plugin with compiling the code myself in the gradle file with customized def files to ensure depends in the def file brings in the missing dependencies, none of which has had any success. I feel like I'm missing something simple that's different between my local environment and the build server but for the life of me can't figure out what it is. Any help would be greatly appreciated. The project: https://github.com/crowded-libs/vitality
    t
    • 2
    • 4
  • d

    Dylan Bettermann

    08/27/2025, 3:11 PM
    Anyone know how to set verbose logging for GitPortal? Context: I'm trying to view the underlying commands so I can look into adding git lfs support.
    ➕ 1
    👋 1
  • s

    Slackbot

    08/28/2025, 4:23 AM
    This message was deleted.
    Screen_Recording_2025-08-20_at_1.mp4
    m
    • 2
    • 1
  • m

    Mats-Hjalmar

    08/28/2025, 6:44 AM
    Hi all, i have a question. Lets say you have a prod, dev and local environment for an app + backend. I would like to be able to switch which environment next to the play icon. However, this is impossible because the gradle task to run the android app is not accepting environment variables for me to check in build.gradle. How have other people managed a one click reliable change in environment.
    not kotlin but kotlin colored 4
    h
    d
    • 3
    • 7
  • s

    Sebastian Schuberth

    08/28/2025, 10:29 AM
    Is there some tooling available to evaluate the cost / readiness of e.g. a Kotlin/JVM project to be ported to KMP? For example, I could imagine a very simple check whether any
    java.*
    imports are present, or in general if Gradle / Maven dependencies on JVM-only artifacts are used.
    o
    t
    • 3
    • 2
  • a

    Alexis

    08/28/2025, 10:44 AM
    Hello everyone, I'm trying to build an Umbrella framework and import it to my iOS app with a local cocoapod integration, but when building the app on XCode I get this error:
    Copy code
    * What went wrong:
    A problem was found with the configuration of task ':umbrella:syncFramework' (type 'FrameworkCopy').
    - Type 'org.jetbrains.kotlin.gradle.plugin.mpp.apple.FrameworkCopy' property 'sourceFramework' specifies directory 'REPO_DIRECTORY/umbrella/build/bin/iosSimulatorArm64/podDebugFramework/LegendrShared.framework' which doesn't exist.
    In my build.gradle.kts I have the following cocoapod block:
    Copy code
    iosX64()
    iosArm64()
    iosSimulatorArm64()
    
    val xcfName = "LegendrShared"
    cocoapods {
        version = "1.0"
        summary = "Legendr iOS umbrella framewok"
        homepage = "<https://www.legendr.app/>"
        name = xcfName
    
        ios.deploymentTarget = "15.6"
    
        framework {
            baseName = xcfName
    
            export(projects.shared.data)
            export(projects.shared.di)
            export(projects.shared.domain)
            export(projects.shared.presentation)
            transitiveExport = true
            isStatic = false
        }
    
        podfile = project.file("../iosLegendrApp/Podfile")
    
        // Maps custom Xcode configuration to NativeBuildType
        xcodeConfigurationToNativeBuildType["CUSTOM_DEBUG"] = NativeBuildType.DEBUG
        xcodeConfigurationToNativeBuildType["CUSTOM_RELEASE"] = NativeBuildType.RELEASE
    }
    and in my ios app I have the following Podfile:
    Copy code
    platform :ios, '15.6'
    
    target 'iosLegendrApp' do
     # Comment the next line if you don't want to use dynamic frameworks
     use_frameworks!
     pod 'LegendrShared', :path => '../umbrella'
    end
    
    target 'Presentation' do
     use_frameworks!
     pod 'LegendrShared', :path => '../umbrella'
    end
    
    target 'Home' do
     use_frameworks!
     pod 'LegendrShared', :path => '../umbrella'
    end
    
    target 'DI' do
     use_frameworks!
     pod 'LegendrShared', :path => '../umbrella'
    end
    I'm not sure what am I missing. Also I'm using touchlab's skie plugin if this could be related? I can share more about my configuration if necessary 🙂
    t
    a
    • 3
    • 4