https://kotlinlang.org logo
Join SlackCommunities
Powered by
# touchlab-tools
  • j

    Javier

    02/08/2025, 3:08 PM
    I am using SKIE to generate swift files in a shared module. Would it be possible to add the Swift files created by protoc to the shared module together the SKIE ones? I would like to avoid adding the gRPC setup into the ios application but keep everything under the shared library. I guess adding
    gRPC-Swift
    and
    SwiftProtobuf
    via Kotlin cocoapods plugin should be trivial, but I am not sure about if I can run protoc and using the same SKIE folder as output directory without breaking SKIE.
    t
    • 2
    • 1
  • j

    Javier

    02/08/2025, 4:44 PM
    Is it possible to play with SKIE and Swift Export to fill the gaps this last does not include yet?
    k
    c
    • 3
    • 4
  • d

    David

    02/08/2025, 9:38 PM
    Wwhat's the difference between SKIE and Swift Export? :S
  • t

    Tadeas Kriz

    02/08/2025, 9:39 PM
    Swift Export doesn't work with the default ObjectiveC export as far as I know, so you can't use them together, whether you use SKIE or not. Swift export also isn't ready for production, so I wouldn't recommend it.
    d
    • 2
    • 9
  • a

    ade

    02/10/2025, 11:21 AM
    When using the xcode-kotlin plugin in an ios app in xcode, and a crash occurs in the kotlin code, is there any way to see the line of code in kotlin where it crashed, or to get a stack trace where I can see it?
  • r

    Raphael TEYSSANDIER

    02/11/2025, 1:48 PM
    Is it possible with SKIE ?
  • m

    Marcel

    02/11/2025, 2:32 PM
    Hello! We are trying to modify our Github action workflow that publishes an XCFramework using KMMBridge to use a Git tag to build the version instead of using the
    gradle.properties
    file as suggested in the docs. So far we can see the tag being properly used and populated everywhere, however, on the latest step
    touchlab/ga-update-release-tag@v1
    we are getting the following error:
    Copy code
    Run touchlab/ga-update-release-tag@v1
    Error: From <https://github.com/xxxxxx/xxxxx-kmp>
     * [new tag]         0.0.52     -> 0.0.52
    You are not currently on a branch.
    Please specify which branch you want to merge with.
    See git-pull(1) for details.
    
        git pull <remote> <branch>
    Attaching our github action yml file to see if it helps 🙏
    publish-iOS.yml
    k
    • 2
    • 2
  • a

    audax

    02/13/2025, 2:27 PM
    We are finally starting with KMP and like the source code based workflow with gitportal. I got excited and checked it out, only then I discovered that it is a Mac-only tool. My team is MacOS and Linux based. Our CI is linux based as well. How do I integrate my linux team members and the CI with gitportal? (logging off for today, I am back on monday)
    k
    • 2
    • 11
  • m

    Marco Signoretto

    02/18/2025, 5:15 AM
    Hello everyone, we are creating an Interface in KMP that returns a kotlin
    Flow
    using SKIE and we are implementing this interface on both Android and iOS, on iOS we are struggling to return the flow from swift side, I have this problematic snippet
    Copy code
    func selectedPaymentMethod(paymentReference: KMPMotEngine.PaymentReference) -> KMPMotEngine.SkieSwiftFlow<SelectedPayment> {
            let flow = KMPMotEngine.SkieKotlinFlowFactorySkieKotlinFlowFactory<SelectedPayment>().createSkieKotlinSharedFlow(replay: 0, extraBufferCapacity: 0)
            Task {
                for await value in self.delegate.selectedPaymentMethod(for: paymentReference.asSuperType()).values {
                    if let value { try await flow.emit(value: value.asKMP(paymentReference: paymentReference)) }
                }
            }
            return KMPMotEngine.SkieSwiftFlow(flow)
        }
    We are consuming
    self.delegate.selectedPaymentMethod
    which returns an
    Infallible
    however if I use the
    Task
    like this I have no way to call `Task.cancel()`I am not even sure it is even possible, does anyone have faced a similar issue of have any suggestion? it would be nice if somehow I could
    task.cancel()
    when
    KMPMotEngine.SkieSwiftFlow
    deinits
  • b

    Bradleycorn

    02/20/2025, 7:38 PM
    Hey gang, I'm running into an issue where Xcode builds fail from time to time due to some kind of issue with having the SKIE
    DefaultArgumentInterop
    setting enabled. I get a bunch of errors around undefined KTOR symbols (I use KTOR in my "shared" module for networking). I can work around the issue, but it's kind of a pain (more info on that in the 🧵) I filed a github issue about this awhile back on the SKIE repo. I'm still seeing the issue, so I was curious if there is any further info on a fix or an easier work around?
    • 1
    • 2
  • c

    Christopher Mederos

    02/21/2025, 2:18 AM
    I'm trying out the swift bridge tool and am getting a build error for Android after successfully building iOS. An ideas why other targets are expecting an implementation and throwing this error?
    Copy code
    Expected ComposeNativeViewFactory has no actual declaration in module <composeApp_debug> for JVM
    • 1
    • 1
  • l

    Leo Yamamoto

    02/24/2025, 8:02 AM
    Hi, have you ever run into an issue with Kermit and multiply-defined symbols in release builds? We use Canard as a logging framework in our KMP library. Recently, we updated one of our dependencies, Compass, to its latest version, and that seems to have a conflict with
    darwin_log_create
    , maybe because it uses Kermit and they both define this symbol: [Kermit] [Canard]. (Full message in thread.) 1. I'm not sure why this only happens with release builds. 2. I'm not sure what changes might have happened in this library or in Kermit that would have made it start having this conflict.
    k
    • 2
    • 9
  • m

    Mohammed Akram Hussain

    02/28/2025, 12:02 AM
    How do I publish WASM binaries along with Android and iOS using KMMBridge? Is KMMBridge just for Android & iOS?
    k
    • 2
    • 1
  • b

    Bijan Cronin

    02/28/2025, 12:57 AM
    I've been trying to get to the bottom of this name collision issue with no luck. Can anyone shed some light on what can possibly be configured incorrectly that is causing this?
    > Task :shared:linkDebugFrameworkIosSimulatorArm64
    w: 'var IntelyShared.Ktor_httpHttpStatusCode.description' was renamed to 'var IntelyShared.Ktor_httpHttpStatusCode.description_' because of a name collision with an another declaration 'func IntelyShared.KotlinBase.description() -> Swift.String'. Consider resolving the conflict either by changing the name in Kotlin, or via the @ObjCName annotation. You can also suppress this warning using the 'SuppressSkieWarning.NameCollision' configuration. However using renamed declarations from Swift is not recommended because their name will change if the conflict is resolved.
    (at public final val description: kotlin.String defined in io.ktor.http.HttpStatusCode from module <io.ktor:ktor-http>)
    d
    b
    s
    • 4
    • 18
  • j

    John O'Reilly

    03/04/2025, 4:47 PM
    If I call a swift async function from kotlin which in turn invokes a kotlin suspend function, is scope in latter case still based on that of the initial invocation (from kotlin to swift)
    👀 1
    t
    • 2
    • 2
  • d

    David Everlöf

    03/05/2025, 1:26 PM
    Hello! Does anyone know if it matters if I add "FirebaseAnalytics" to the iOS app as a static or dynamic framework? https://crashkios.touchlab.co/docs/crashlytics/
    👀 1
    b
    k
    • 3
    • 53
  • c

    Christopher Mederos

    03/12/2025, 1:37 AM
    Circling back on this - any ideas on why the ComposeNativeViewFactory.nonios.kt for Android wouldn't be generated on some builds? https://kotlinlang.slack.com/archives/CTJB58X7X/p1740634460460879
    • 1
    • 1
  • s

    siraf

    03/20/2025, 4:25 PM
    Hi all, is there anyone using KMMBridge and SQLCipher for iOS? Asking because SQLCipher is not supporting SPM yet, so I am curious if we should switch to the KMMBridge because it suggests using SPM. Currently we are installing our KMM library using Cocoapods and it installs the SQLCipher🔒 along the way, like this(build.gradle.kts):
    Copy code
    kotlin {  
      cocoapods {
        summary = "My Library"
        homepage = "github_path_to_the_library"
        ios.deploymentTarget = "14.0"
         
        tasks.withType(org.jetbrains.kotlin.gradle.tasks.CInteropProcess::class.java) {
          settings.compilerOpts("-DNS_FORMAT_ARGUMENT(A)=")
        }
    
        framework {
          baseName = "MyLibrary"
        }
    
        pod(name = "SQLCipher", version = "4.5.7") // <- HERE
        …
      }
    }
    k
    • 2
    • 22
  • x

    xiaobailong24

    03/21/2025, 7:41 AM
    Hello folks,
    xcode-kotlin info
    show null with Xcode16.2, is there a problem? Thx.
  • s

    Simon Binder

    03/21/2025, 9:58 AM
    Hi, we're using SQLiter and SKIE and are facing some linker issues. I think I understand the cause, but I'm not sure how to address this and I wonder if someone here might have ideas. For context, our setup is basically this: 1. We have a KMP library depending on SQLiter to access SQLite. 2. I don't think this is relevant to this issue, but we're linking sqlite3 statically because we need extension loading which is otherwise not available on macOS. We create a
    <http://libsqlite3.ar|libsqlite3.ar>
    by invoking clang through the KMP
    PlatformManager
    and we include that with a cinterops definition having a
    staticLibraries
    option. 3. We then export our project as an xcframework. I know that our setup generally works because Kotlin tests depending on SQLite pass on all platforms we care about (and I checked with
    nm
    that a copy of SQLite is part of the test executable there). When consuming the exported xcframework on a Swift project on macOS though, we get linker errors about missing symbols like
    sqlite3_column_database_name
    or
    sqlite3_win32_set_directory
    . What all the missing symbols have in common is that they're optional or platform-specific, so they're not enabled by default (
    column_database_name
    needs
    SQLITE_ENABLE_COLUMN_METADATA
    , for example). From my understanding, the root cause is this: 1. The cinterop setup on SQLiter creates Kotlin functions for all symbols defined in
    sqlite3.h
    . 2. When we test with Kotlin, we compile an executable from which unused symbols are removed by the linker (?), and since we're not calling
    sqlite3_column_database_name
    anywhere, the undefined symbol is never part of the executable. 3. When exporting the library as a framework, the symbols aren't stripped and consumers can't link our framework? Is there a way for us to fix this by e.g. removing unused symbols when creating the xcframework?
    • 1
    • 1
  • s

    Siggi Gunnarss

    04/09/2025, 12:18 PM
    Hello y'all. I'm working on scaling up KMP in my current project. It's moderately large with dozens of developers. Our kmp "library" has a large number of modules. We use the library model with a swift package and maven distribution for consuming the library. Local development is done pretty awkwardly with by publishing a Swift package locally on iOS and a local maven for android. I'm sold on this blog posts about compiling from source: https://touchlab.co/kmp-teams-use-source Hopefully we'll soon be compiling from source on iOS soon when doing local development, but I feel like a better integration between our gits is needed. A tighter linking between the 3 gits and building from source by default. I think a monorepo is out of the question due to team/project size. Basically I want submodules, but good. :) Is anyone here using GitPortal with success? Or a homegrown approach that works in a similar way?
    f
    k
    +3
    • 6
    • 35
  • j

    John O'Reilly

    04/11/2025, 9:59 AM
    Is there a version of SKIE that works with Kotlin 2.1.20?
    j
    • 2
    • 1
  • b

    Bradleycorn

    04/11/2025, 8:00 PM
    Hi everyone. I am finally getting around to updating my KmmBridge setup to 1.2.1 (from 0.5.5) , and I'm running into a problem. I have a custom Gradle plugin that is applying configuration for my umbrella (allShared) module. With 0.5.5, I could call the
    addGithubPackagesRepository()
    method from my plugin, like this:
    Copy code
    class UmbrellaModuleConventionPlugin: Plugin<Project> {
        override fun apply(target: Project) = with(target) {
            with(pluginManager) {
                apply(kmpLibs.plugin("touchlab.kmmbridge"))
                apply(kmpLibs.plugin("kotlin.cocoapods"))
            }
            extensions.configure<KotlinMultiplatformExtension>(::configureCocoapods)
            addGithubPackagesRepository()
    
            ...
        }
    }
    But when I update to 1.2.1, I now get an error:
    Unresolved reference: addGithubPackagesRepository
    The line above that applies the kmmbridge plugin
    apply(kmpLibs.plugin("touchlab.kmmbridge"))
    is using the "github" version of the plugin:
    touchlab-kmmbridge = { id="co.touchlab.kmmbridge.github", version.ref="touchlab-kmmBridge"}
    And the gradle config for my plugin module, is using the kmmbridge gradle plugin:
    Copy code
    dependencies {
        compileOnly(kmpLibs.android.gradlePlugin)
        compileOnly(kmpLibs.kotlin.gradlePlugin)
        compileOnly(kmpLibs.touchlab.kmmbridge.gradlePlugin)
    }
    touchlab-kmmbridge-gradlePlugin = { group="co.touchlab.kmmbridge", name="kmmbridge", version.ref= "touchlab-kmmBridge" }
    I'm not sure where I'm going wrong???
    k
    • 2
    • 4
  • m

    Mohammed Akram Hussain

    04/17/2025, 12:27 PM
    This article talks about importing the .wasm file in the HTML and then accessing it from the window object. How do I go about if I want to use Wasm in React which doesn't have any HTML file and all are .js files?
    f
    • 2
    • 1
  • b

    Bradleycorn

    04/25/2025, 3:00 PM
    Circling back/extending a previous conversation ... My teams have been using KmmBridge to share our KMP code as a library for our android and ios apps. We have a development process setup that mostly works well for us. There's one piece that I wish we could do better, but I'm not sure how/what to do ... When working on a feature for our apps, a dev team might make several commits to a feature branch in the KMP repo. For the devs, this is no problem. We use the Local Dev Flow . They have the appropriate feature branch checked out, and can do their dev on the feature. The issue is with our automated builds for our QA process. We use Github Actions to do a build of the app when a PR is merged to a feature branch. When that happens, the app needs to know what "version" of the kmp library to use. To this point, we've just been publishing a new version with every piece of work on the feature so that there's a new version number for the automated build to pull. But that's really not a great solution long term. We're publishing tons of versions, many of them with "partially working" features. We may want to expose the published library to some third party partners, and at that point we definitely don't want to expose "half baked" versions. I've been trying to think of a way to get those automated feature builds of the apps to work without having to publish a new version of the kmp library. Curious if anyone else has run into and solved this issue?
    k
    • 2
    • 5
  • a

    Abhishek Agarwal

    04/29/2025, 8:04 AM
    Hi all, I use KMMBridge to consume my kotlin modules in ios code , I am currently the only developer in my team, so I don't have any pipeline setup , I. use
    /.gradlew spmDevBuild
    to make the framework and then archive my ios project directly through xcode , I was just wondering is there any way here to make the release version of the framework as AFAIK, this produces a debug version of the Kotlin code.
    k
    • 2
    • 3
  • i

    Ismail

    04/29/2025, 12:57 PM
    👋, I came across this TouchLab article Beware of Build Time Bloat due to having very, very slow CI performance when running iOS tests; it takes about 40+ minutes to complete. I've tried asking around in other channels, such as "multiplatform". Are there any tips in improving CI build times? FYI, this is a multi module CMP project, if we run it locally it's under 10-12 mins but ci it's way longer
    s
    • 2
    • 1
  • v

    Vita Sokolova

    04/30/2025, 11:47 AM
    Hi everyone! I’m checking how we can use gradle cache to build our KMP multimodule project on CI faster and I see messages like this:
    Copy code
    Caching disabled for task ':common:publishKotlinMultiplatformPublicationToGitHubPackagesRepository' because:
      Not worth caching
    Task ':common:publishKotlinMultiplatformPublicationToGitHubPackagesRepository' is not up-to-date because:
      Task has not declared any outputs despite executing actions.
    Can share with me what should be the reasonable gradle cache configuration for a KMP project?
  • p

    Peter Ringset

    05/06/2025, 9:05 AM
    Hi! Is it possible to create Skie flows from Swift? My use-case is that I have an interface in KMP that uses
    Flow<Int>
    as the type for one of the fields, and that interface when translated to Swift uses
    SkieSwiftFlow<Int>
    . This interface should be implemented by one of my Swift classes. What’s the best/easiest way for the Swift class to create an instance of
    SkieSwiftFlow<Int>
    ?
    s
    f
    • 3
    • 3
  • b

    brabo-hi

    05/08/2025, 7:50 PM
    Hi any Skie release targeting kotlin 2.1.20 ?
    j
    • 2
    • 1