https://kotlinlang.org logo
Join Slack
Powered by
# touchlab-tools
  • 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
    • 4
  • 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
  • d

    Dhruv Singh

    05/13/2025, 5:01 PM
    Hi Team 👋 Quick Question - Interface in Kotlin is reference type whereas Protocols in Swift don't have an inherent type classification. How to leverage the protocol like construct using the KMP? For example:
    Copy code
    struct HeadlessPaymentOptionsResponse: Codable, Equatable {
        let param2: String
        let param1: String
    }
    cc @chandilsachin
  • b

    Bradleycorn

    05/14/2025, 8:57 PM
    Hi all. I am updating to the latest KmmBridge (from 0.5.5), and I'm getting the dreaded "*Task 'kmmBridgePublish' not found in root project"* error when running a build via CI (Github Actions). First, yes, I am passing the
    ENABLE_PUBLISHING=true
    property when running the kmmBridgePublish task. Hoping someone can point me in the right direction .... More details in the 🧵
    k
    • 2
    • 9
  • b

    Bradleycorn

    05/15/2025, 8:44 PM
    New kmmBridge question ... Recent versions (1.2.1) publish the xcframework artifact to the github release and reference the URL for that artifact in the Package.swift file that gets produced. In my case, I also need to support cocoapods (bleh ... at least for the time being). The cocoapods quickstart looks like it is configured to still use maven repo (github packages) for the artifact. Is there a way to get it to use the same artifact that spm uses (the file uploaded to the github release)? I was hoping that it would "just work" by using the
    gitHubReleaseArtifacts()
    configuration, but alas it doesn't seem to. I have the proper deploy keys, netrc entries, etc setup. But my (CI) build fails when validating the produced podspec. I get:
    Copy code
    - ERROR | [iOS] unknown: Encountered an unknown error ([!] /usr/bin/curl -f -L -o /var/folders/w5/_8wgjw3j5cg6mgrth3s2kg9m0000gn/T/d20250515-12410-9mp3pi/file.zip <https://api.github.com/repos/myorg/myrepo/releases/assets/255030196.zip> --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.16.2 cocoapods-downloader/2.1' -H Accept: application/octet-stream
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
      0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
      0   280    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    curl: (56) The requested URL returned error: 403
    ) during validation.
    Perhaps there's something else I need to do with the configuration or ci build workflow?
    • 1
    • 1
  • b

    Bradleycorn

    05/16/2025, 5:48 PM
    Following up on my post yesterday about kmmbridge and cocoapods ... Seems like it's a permissions issue when it tries to validate the podspec (and thus pull down the framework from the supplied url). My repo is private, but I have setup an ssh key and a netrc file (the same as what I have been using for kmmbridge 0.5.5), so it seems like it should work, but apparently not. Anyone know of any other authentications I need to provide?
  • k

    kpgalligan

    05/16/2025, 6:38 PM
    There was a bug with using release builds with cocoapods, but AFAIK, that should be fixed and published. Cocoapods is a huge PITA for CI, and not that many people are using it now, so the KMMBridge config for it rarely gets run or troubleshot. Cocoapods specifically won't publish unless it can build successfully, which means the 15 things you need to do need to be done exactly correct. The only reasonable way to debug that is to try to publish from you local machine with that release URL, then if that works, try to debug why CI is failing.
    b
    • 2
    • 4
  • l

    Leo Yamamoto

    05/20/2025, 5:25 PM
    Hi there! 👋 When might there be a new release of Kermit that includes this recently-merged PR #439?
  • n

    Nikolay Kasyanov

    05/27/2025, 2:41 PM
    Hello folks, I have a question that is related to Skie. With Skie adding Swift code to KMP frameworks, this becomes relevant to reduce their final size. I’m curious if anyone has done it already for their framework. I tried to slap something together but the issue I’m facing is this: if I do the stripping after my framework is assembled, this modifies the output of the assembly task, meaning it will be always re-run in the next build, and then stripped again, the cycle continues. What could be a way around that? A broader question: would this make a good configuration option for Skie itself?
    d
    t
    • 3
    • 8
  • c

    Christopher Mederos

    05/29/2025, 1:29 AM
    given the latest SKIE release, will there be a release for compose-swift-bridge supporting Kotlin 2.1.20 as well? thanks!
    ☝️ 1
  • m

    Mark

    06/01/2025, 11:34 AM
    I’m in the process of migrating my Android app to KMP, and am about to tackle the sqlcipher/sqldelight part. I noticed this article, but also that it’s about 5 years old. Is it still the way to go, or have there been relevant developments since? https://touchlab.co/multiplatform-encryption-with-sqldelight-and-sqlcipher
    k
    • 2
    • 1
  • b

    Bradleycorn

    06/10/2025, 3:49 PM
    I'm having some trouble with KmmBridge. Specifically, the
    touchlab/ga-update-release-tag
    github action doesn't seem to be working right ... The action runs (successfully), but it doesn't seem to do anything. When I check the tag that gets created in my repo, there is no extra commit, and there is no Package.swift file. However, when I check the github release, the xcframework binary has bee uploaded. That part from the build steps seems to be working. It's just that the update release tag action doesn't seem to be working or doing anything. not sure what I'm doing wrong, or where to start debugging.
    • 1
    • 1
  • t

    Trey

    06/10/2025, 8:28 PM
    I'm using Kotlin Multiplatform resources and SKIE. Is there a way to grab a resource string from Swift code easily? This is just for a default string in an extension on iOS.
  • 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