https://kotlinlang.org logo
Join Slack
Powered by
# touchlab-tools
  • d

    David

    06/12/2025, 10:46 AM
    I added SKIE to my KMM lib, the diff looks like this: Now I'm getting in Xcode the error "Could not build Objective-c module..." Any idea what the issue might be?
    f
    • 2
    • 1
  • c

    christian.steffensen

    06/19/2025, 11:10 AM
    EDIT: resolved, nevermind 🙂 Posting this here, as it seems to be related to suspending functions and enums, apologies if it’s actually more of a general multiplatform question 🙂 Just looking to hear if anyone has experienced something similar We’re having a weird issue where iOS is suddenly not able to see suspending functions and enums. It has worked perfectly fine and just “randomly” broke, even though we hadn’t changed anything major in the latest version of our shared library. It works when building locally with We get errors like
    Value of type X has no member Y
    where X is a class and Y is a suspending function We also get the error:
    No exact matches in global call to onEnum
    The only thing we have changed recently is updated to Kotlin 2.1.20, where we got a
    Can't find env_blacklist file
    error, which was at first fixed by calling
    ./gradlew commonizeNativeDistribution
    before building - that fixed the build and the following released worked just fine. But, now we just made another release and it no longer works on iOS, with the issues mentioned above. On suggestion from KT-72068 we have tried adding
    kotlin.native.toolchain.enabled=false
    but that made no difference Skie 0.10.2 Kotlin 2.1.20 Gradle 8.11.1 The library is built using assembleFramework and publishing it manually to github package registry
    • 1
    • 1
  • d

    Daniel Žůrek

    06/20/2025, 1:53 PM
    Hey all 👋 I have a question related to
    Gitportal
    . Library files are added to git, running
    gitportal setup library ...
    command, even though the library folder is in
    .gitignore
    . Resulting in:
    Copy code
    The following paths are ignored by one of your .gitignore files:
    library
    Is this an intentional way of force versioning in android/ios repo? We want to use gitportal for our shared code but we'd like to avoid having the same code mixing in PRs etc.
    👀 1
    k
    • 2
    • 1
  • a

    aoriani

    07/02/2025, 2:06 AM
    I created a small PR to add wasm support for kermit-koin https://github.com/touchlab/Kermit/pull/447. Thanks cc: @kpgalligan @Sam Hill @Kevin S
    👍 1
    k
    • 2
    • 1
  • j

    Johan Reitan

    07/03/2025, 3:24 PM
    After updating to Kotlin 2.2.0 the dreaded linker issue with kermit-crashlytics returned:
    Copy code
    dyld[42183]: symbol not found in flat namespace '_FIRCLSExceptionRecordNSException'
    This only happens when running tests. I have disabled the native cache, applied the
    crashkios
    plugin and also added the linker options manually to no avail:
    Copy code
    compilerOptions.freeCompilerArgs.addAll(
        "-linker-options",
        "-U _FIRCLSExceptionRecordNSException ",
    )
    What changed?
  • s

    Stylianos Gakis

    07/07/2025, 8:14 AM
    A sanity check, using SKIE, if I am publishing a XCFramework using an "umbrella" module which wraps and also publishes other modules, do I need SKIE applied on: • just on the modules that contain the source code • only on the umbrella module • both
    f
    • 2
    • 2
  • j

    jessewilson

    07/08/2025, 7:37 PM
    I’m setting up Xcode Kotlin and my breakpoints aren’t working. Any tips?
    k
    • 2
    • 8
  • a

    Abhishek Agarwal

    07/12/2025, 9:37 PM
    Hey All, I’m hitting a weird SPM issue in our Prod-scheme Simulator build: Env: macOS 26, Xcode sim iOS 18.5, skie 0.10.4, kmmbridge 1.0.0, xcode 16.4 Setup:
    ./gradlew spmDevBuild
    → debug XCFramework with arm64-device, arm64-sim & x86_64-sim I am able to run the debug version of my app with the generated kMP spm package in any simulator and real device but the release version of the app is running only in real device , when trying to run it in simulator the build fails showing error like
    Copy code
    Cannot find type 'SkieSwiftFlow' in the scope   
    Cannot find files from my Kotlin code....
    I use umbrella module technique to build KMPModules , this is how it is configured
    Copy code
    listOf(
        iosArm64(),
        iosSimulatorArm64(),
        iosX64()
    ).forEach {
        it.binaries.framework {
            export(project(":kmm-analytics"))
            export(project(":kmm-util")) 
            //...other modules 
            export(libs.resources)
            export(libs.androidx.lifecycle.viewmodel)
            isStatic = true
            baseName = "KMMShared"
        }
    }
    t
    f
    b
    • 4
    • 23
  • c

    Christopher Mederos

    07/14/2025, 1:11 AM
    Has anyone managed to get compose-swift-bridge working with cmp 1.8? I tried bumping my kotlin, skie, ksp versions... but all the ksp configurations are no longer being picked up in my gradle build. Any thoughts? ( these configs from the docs aren't picking up the tasks correctly anymore)
    Copy code
    // Adds the required targetName for the KSP plugin
    tasks.withType<com.google.devtools.ksp.gradle.KspTaskNative>().configureEach {
        options.add(SubpluginOption("apoption", "compose-swift-bridge.targetName=$target"))
    }
    
    // support for generating ksp code in commonCode
    // see <https://github.com/google/ksp/issues/567>
    tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask<*>>().configureEach {
        if (name != "kspCommonMainKotlinMetadata") {
            dependsOn("kspCommonMainKotlinMetadata")
        }
    }
    Missing subplugin option -
    Copy code
    [ksp] java.lang.IllegalArgumentException: Missing compose-swift-bridge.targetName, see docs
    Missing task depends on -
    Copy code
    Reason: Task ':composeApp:kspKotlinIosSimulatorArm64' uses this output of task ':composeApp:kspCommonMainKotlinMetadata' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    • 1
    • 1
  • j

    jessewilson

    07/14/2025, 2:16 PM
    I just got this scary-looking compile fail:
    Copy code
    > Task :zipline:iosX64Quickjs FAILED
    In file included from /Volumes/Development/zipline/zipline/native/quickjs/quickjs.c:34:
    /Applications/Xcode-16.4.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/math.h:619:27: error: _Float16 is not supported on this target
    extern _Float16 __fabsf16(_Float16) __API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0));
                              ^
    I tracked it down thanks to this bug. The fix was straightforward, once I figured out where to put it:
    Copy code
    cklib {
      config.kotlinVersion = libs.versions.kotlin.get()
      create("quickjs") {
        language = C
        srcDirs = project.files(file("native/quickjs"), file("native/common"))
        compilerArgs.addAll(
          listOf(
            ...
            "-D_Float16=short", // KT-69094
          )
        )
      }
    }
  • n

    Nikky

    07/20/2025, 6:26 PM
    hi, i am trying to use sqliter with a mingwX64 target
    Copy code
    > Task :linkDebugExecutableMingwX64 FAILED
    e: C:\Users\nikky\.konan\dependencies\llvm-16.0.0-x86_64-windows-essentials-56/bin/clang++ invocation reported errors
    
    The C:\Users\nikky\.konan\dependencies\llvm-16.0.0-x86_64-windows-essentials-56/bin/clang++ command returned non-zero exit code: 1.
    output:
    lld: error: unable to find library -lsqlite3
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    i saw that the github CI for this project sets up msys2 with a few packages.. and adds msys2 to the path so i installed that also tried running it from within mysys2 is there any sample project that uses ideally sqldelight and sqliter on a windows target ? tried adding the same linkeropts like so
    Copy code
    compilations.forEach { kotlinNativeCompilation -> kotlinNativeCompilation.kotlinOptions.freeCompilerArgs += listOf("-linker-options", "-lsqlite3 -Lc:\\msys64\\mingw64\\lib") }
    this produces a different set of errors.. mainly a bunch of undefined symbol stuff
    k
    • 2
    • 1
  • j

    John O'Reilly

    08/02/2025, 7:49 AM
    Is there a pre-release version of SKIE that I can use alongside Kotlin
    2.2.20-Beta2
    ?
  • b

    Bradleycorn

    08/05/2025, 3:32 PM
    Hey gang ... We are finally getting our ios app off of cocoapods ( 🎉 ). We're using KmmBridge and have it setup with binaries and SPM. This works fine. Our next step is to setup Kotlin Debugging in Xcode. I've done this a little bit before in a demo project, so I'm familiar with how it works, etc... Our devs are setup to use the local dev flow so that they can build the app, and have it use their local copy of the kmp project (which is based on a feature branch of the feature they are working on). My question is, how do you all handle doing CI builds of in-flight features (i.e. builds in between versioned releases). We basically need something similar to the "local dev flow", but for CI (specifically, github actions). When a PR is merged into a feature branch, we kick off a build of the feature branch in github actions to produce a build of the app that our QA team can use for testing. I'm curious if anyone has come up with a good way to facilitate these incremental CI builds? Right now, we just publish a new version of the kmp library every time. But that's not really sustainable. I'm wondering if there's a better way?
    s
    • 2
    • 1
  • m

    MarkRS

    08/06/2025, 3:20 PM
    The Kermit web page says "Disable local logging for production, or even strip log statements altogether with a compiler plugin" but I can't find any reference to these in the documents. Where should I look?
    k
    • 2
    • 4
  • b

    Bradleycorn

    08/07/2025, 1:29 PM
    Hi all, Question about the "SPM Local Dev Flow" for KmmBridge. I set it up and everything works pretty good. When I'm working in that flow, ifI make some edits to the kotlin code, I presume I'll need to run the
    spmDevBuld
    again to produce a new framework with the updated code changes ... right?
    k
    • 2
    • 1
  • b

    Bradleycorn

    08/15/2025, 3:10 PM
    Hi Everyone. Several people have run into an issue in Android Studio with KMP projects when using the TouchLab Xcode Kotlin plugin. The issue is defined here: https://youtrack.jetbrains.com/issue/KMT-1299/After-upgrading-to-Narwhal-Project-JDK-is-not-defined A few details: When you have an "integrated" project, and you use the Xcode Kotlin plugin to debug kotlin code in Xcode, you will run into this issue when you open the project in Android Studio Narwhal (and have the Kotlin Multiplatform Plugin enabled in Android Studio). As stated in the linked issue, when you add a reference to the Kotlin source files in your Xcode project (so that you can set breakpoints and debug), it causes some kind of issue, and back over in Android Studio everything goes haywire. If you remove the references to the Kotlin source files from the Xcode project, the project immediately starts working again in Android Studio. Anyway, I don't know/think this is an issue with the Touchlab Xcode plugin (it seems to be an issue with the IntelliJ KMP Plugin for Android Studio). But I wanted to post it here in case anyone else runs into it. h/t to @Brandon Smith for figuring out the issue!
    k
    • 2
    • 3
  • a

    audax

    08/21/2025, 7:38 AM
    We are building a multiplatform shared module which is providing ViewModels, but not Views. How do I best provide a Coroutine scope and all the lifecycle stuff on iOS? Ideally I want to use the KMP-ViewModel directly as state and for callbacks. I need to pass some arguments into the constructor of the ViewModel.
    f
    d
    • 3
    • 17
  • j

    Jacob Kwitkoski

    08/27/2025, 6:30 PM
    We're looking at using GitPortal to help manage our KMP explorations, but there's a couple things holding us back: 1. Lack of support for self-managed/self-hosted (e.g. GHE) https://github.com/touchlab/GitPortalCli/issues/1 2. Inability to turn off Sentry: https://github.com/touchlab/GitPortalCli/blob/main/cli-build/src/commonMain/kotlin/MainCli.kt#L10-L21 For
    2.
    should I log a new issue on GitHub for that?
  • t

    touchlab_justin

    09/08/2025, 8:38 PM
    Last week, SKIE hit 1000 github ⭐🤩 (we hit 1000 users a long time ago) Perfect timing, because Sep 5 was SKIE’s 2 year anniversary of launching as open source 🎊 🎂 Thank you to everyone using SKIE, offering feedback, and sharing your experiences in blog posts 🙏 If you are using SKIE in production, please take a moment to post to https://github.com/touchlab/SKIE/discussions/154 🙋 if you can’t share, please send another ⭐
    🚀 11
  • j

    John O'Reilly

    09/12/2025, 4:04 PM
    When is it hoped (roughly) to have version of SKIE that works with Kotlin 2.2.20?
    ⏳ 7
    plus1 5
    d
    f
    +2
    • 5
    • 6
  • b

    Bradleycorn

    09/19/2025, 7:12 PM
    I have a Kotlin / SKIE / Swift concurrency question. 🫣 It makes my brain hurt just saying that. So, I have a KMP project, and it's using SKIE (and KmmBridge) and I'm producing a SPM package, being consumed by an xcode ios app project. Great. I have a Kotlin class that has a suspend function:
    Copy code
    class MyKotlinClass {
       suspend fun doWork() {
          // fetch data from an api using ktor
       }
    }
    My ios project is using swift 6.2. I have setup the project in xcode with default actor isolation to use MainActor by default. My understanding is that swift 6.2 also applies
    nonisolated(nonsending)
    as the default on async functions, so if you have some code like this, the async function will be called on the MainActor:
    Copy code
    class SwiftClass {
       let repoClass: SomeSwiftRepository
    
       func doSwiftThings() async {
          try await repoClass.someAyncFunction()
       }
    }
    And indeed this works. I don't see any errors. However, if I try to use the Kotlin object instead, I get concurrency errors:
    Copy code
    class SwiftClass {
       let repoClass: MyKotlinClass
    
       func doSwiftThings() async {
          try await repoClass.doWork()
       }
    }
    But here's the part I really don't understand. It tells me that > @concurrent instance method 'doWork() risks causing data races. I understand why a
    @concurrent
    method here would have a risk of data races. What I don't understand is why swift thinks it's
    @concurrent
    ? It's swift 6.2, shouldn't it use the default
    nonisolated(nonsending)
    ? I even enabled the NonisolatedNonsendingByDefault compiler flag to be extra sure. Nowhere in any of the generated headers or code from the kotlin library do I see that
    doWork
    is marked as
    @concurrent
    . So where is that coming from? And even more confusing, if I remove the NonisolatedNonsendingByDefault compiler flag, then the error changes and tells me that: >
    doWork
    is a "nonisolated instance method". This confuses me. Like I said, I understand why a
    @concurrent
    or
    nonisolated
    method call would risk data races. I don't understand why the kotlin method call is getting flagged as such. Concurrency in swift is hard all on its own. Concurrency with Kotlin code running in swift is x10000, and it doesn't help that there's very little documentation (that I can find) about how concurrency interop between kotlin and swift does/doesn't work. Thankfully there is some information in the skie suspend functions documentation about how things work.
    t
    • 2
    • 1
  • a

    Alexis

    09/25/2025, 12:06 PM
    Hello, I'm trying to implement Crashlytics in a KMP project. The native implementations are working well for Android and iOS, but now I'm having trouble getting report from the Kotlin Shared code on iOS. I've implemented Crashkios by following what's in the doc: https://crashkios.touchlab.co/docs/crashlytics But I still get an error about missing dSYM on Crashlytics for Kotlin related crashes. So I'm now trying to implement step 3a and 3b from the doc even though I have the following in my gradle file:
    Copy code
    listOf(
            iosX64(),
            iosArm64(),
            iosSimulatorArm64()
        ).forEach { target ->
            target.binaries.framework {
                ...
                isStatic = true
                ...
    }
    But I don't know how to adapt the following script for local SPM integration:
    Copy code
    Pods/FirebaseCrashlytics/upload-symbols -gsp ios/GoogleService-Info.plist -p ios ../shared/build/cocoapods/framework/shared.framework.dSYM
    I've looked into my module's build folder but couldn't find any .dSYM.
  • f

    Flavio Suardi

    10/06/2025, 2:41 PM
    Hi, I have a KMP project that uses SKIE to map the Flows defined and used in classes from the shared module into Swift. In the shared module, I define interfaces that need to be implemented natively. A typical use case is defining an interface for a BLE service, where I want the implementation to be platform-specific. While everything works smoothly on Android, I’ve run into some limitations when using Flow on iOS. Let’s say we have the following interface:
    Copy code
    interface IBleService {
         val connectionState: Flow<ConnectionState>
         fun scan(): Flow<Device>
    }
    When implementing this interface in the iOS project, there’s currently no way to create a
    SkieSwiftStateFlow
    (or similar) that can be returned from the
    connectionState
    property and the
    scan()
    function. Just like on Android, it would be great to have a mechanism to create flows, something like
    flow {}
    or
    channelFlow {}
    , or even a proper constructor to instantiate them directly. The question is essentially related to this discussion: https://github.com/touchlab/SKIE/discussions/54, which unfortunately has not been followed up. Thank you.
    s
    • 2
    • 2
  • k

    kpgalligan

    10/09/2025, 5:33 PM
    SKIE release delayed timing update Hey folks, we’re targeting November for the full release. Why: • This release is more complex due to the recent Kotlin compiler changes. • Touchlab's current project load is keeping us from dedicating more time to the update and it's making progress slower than we would all like. We know everyone needs this as soon as possible, and we appreciate the patience. Please know we are working to change the way SKIE updates get staffed in 2026 to avoid these delays in the future. As we have more details on that, we'll share them. We’ll share another update in early November.
    ❤️ 9
    kodee loving 17
    🚀 8
    d
    f
    • 3
    • 3
  • j

    Jazmine Barroga

    10/14/2025, 9:33 AM
    Hello in our kmp project, we’re moving away from using cocoapods to using spm. is there a way via kmmbridge to generate the dependencies in the Package.swift, similar to how we define pod dependencies in the gradle file to generate the dependencies in the podspec?
    k
    f
    • 3
    • 12
  • t

    Tepes Lucian Victor

    10/17/2025, 7:27 PM
    Hello! Playing around with skie and i'm getting
    For-in loop requires 'any Gradle__org_jetbrains_kotlinx_kotlinx_coroutines_core_iosarm64_1_10_2Flow' to conform to 'AsyncSequence'
    - am I missing something? I know it worked for me in the past.
    t
    • 2
    • 10
  • d

    Drake Gebhart

    10/18/2025, 5:56 AM
    I'm trying to make sense of my iOS stack traces in my CMP project. I tried NSExceptionKt and that didn't work because it couldn't find
    import NSExceptionKtBugsnag
    . Then I tried Crashkios and I followed the tutorial to the end and it failed on
    BugsnagConfigKt.startBugsnag(config: config)
    because it didn't recognize
    BugsnagConfigKt
    . I feel like I'm taking crazy pills when they both won't work! Bugsnag works fine and its in the same spot, so I'm pretty confused 😖 I also used a basic CMP project to verify it wasn't anything weird with my config
    f
    r
    k
    • 4
    • 9
  • a

    Alexis

    10/23/2025, 2:57 PM
    Hello, I've implemented CrashKiOS (with Crashlytics) to my KMP project, and I wanted to know if by any chance it was possible to check if crashlytics is enable and how to manually disable it from Kotlin?
    k
    • 2
    • 4
  • s

    Sanju Naik

    10/24/2025, 6:04 AM
    Hi, I am trying to integrate KMP project as a direct source code dependency in Xcode project using xcode kotlin plugin . App builds and runs fine But Breakpoints are working only for the code in
    common/src/commonMain
    but not working for feature modules. feature modules are added as a dependency on common module using
    Copy code
    sourceSets {
            val commonMain by getting {
                dependencies {
                    // feature module dependencies.
                 }
            }
        }
    and they are also exported while generating framework using
    export()
    . This is the command we are running in Xcode run script
    ./gradlew :common:embedAndSignAppleFrameworkForXcode
    . Anything we are missing or any additional setup is needed to get breakpoints work for feature modules?
    a
    k
    • 3
    • 5
  • s

    Sanju Naik

    10/28/2025, 2:37 PM
    Hi, facing
    sqlite3
    linker errors while building the iOS App which depends on KMP dependency that uses
    libs.sqldelight.native
    . Tried adding
    -lsqlite3
    to Xcode's other linker flags and also passing it as linkerOptions in
    Copy code
    listOf(
            iosX64(), // Simulator running on Intel based chips.
            iosArm64(), // Actual devices running on Apple bionic.
            iosSimulatorArm64() // Simulator running on M1 chips.
        ).forEach { iosTarget ->
            iosTarget.binaries.framework {
                baseName = "SomeName"
                isStatic = true
                linkerOpts("-lsqlite3")
    }}
    But still it didn't help, Any idea on how to solve this? NOTE: the same setup was working when we were depending on KMM as a cocoapods dependency. Adding linker errors in the thread
    s
    • 2
    • 7