• v

    Vivek Modi

    4 months ago
    Hey guys, I am trying to use interface in swift, but it unable to find the property
    commainMain
    interface ApplicationToken {
        val accessToken: String
        val refreshToken: String
    }
    iosMain
    Platform.kt
    lateinit var tokenProvider: ApplicationToken
    HttpClient.kt
    actual fun httpClient(config: HttpClientConfig<*>.() -> Unit) = HttpClient(Darwin) {
        config(this)
        engine {
            configureRequest {
                setAllowsCellularAccess(true)
            }
        }
        install(Auth) {
            bearer {
                loadTokens {
                    BearerTokens(tokenProvider.accessToken, "")
                }
            }
        }
    }
    Now when I am to access
    tokenProvider
    in my swift code. It cannot find. I am adding image please have a look.
    v
    russhwolf
    3 replies
    Copy to Clipboard
  • Francis Mariano

    Francis Mariano

    4 months ago
    Hello everyone. I am trying to change a variable in a singleton and the IDE displayed me the following message:
    With old Native GC, variable in singleton without @ThreadLocal can't be changed after initialization
    . Are there a new Native GC ????
    Francis Mariano
    mbonnin
    3 replies
    Copy to Clipboard
  • j

    julioromano

    4 months ago
    In Kotlin’s 1.6.20 default hierarchical project structure, what are all the predefined intermediate source sets? The docs talk about
    iosMain
    but not others. Are there more predefined ones?
    j
    Michael Friend
    +2
    10 replies
    Copy to Clipboard
  • v

    Vaios Tsitsonis

    4 months ago
    Hello, I try to build a project but it fails. I get the following error
    > Could not download kotlin-native-prebuilt-macos-x86_64-1.6.20.tar.gz (:kotlin-native-prebuilt-macos-x86_64:1.6.20)
       > Could not get resource '<https://download.jetbrains.com/kotlin/native/builds/releases/1.6.20/macos-x86_64/kotlin-native-prebuilt-macos-x86_64-1.6.20.tar.gz>'.
          > Read timed out
    I can download the file manually. Is this an issue with the IDE? Can I do something with the downloaded file and import it manually?
    v
    Landry Norris
    3 replies
    Copy to Clipboard
  • Paul Woitaschek

    Paul Woitaschek

    4 months ago
    https://blog.jetbrains.com/kotlin/2022/05/kotlin-1-7-0-beta/ Anyone has an idea what this means?
    You can try the Alpha version of the new Kotlin/Native memory manager in Kotlin 1.7.0-Beta. This EAP release brings performance improvements to the new memory manager that will improve the developer experience.
    How do performance improvements improve the developer experience? Is there any more information on that? This sounds like it’s only an improvement of build performance but no behavior change compared to 1.6?
    Paul Woitaschek
    mbonnin
    +3
    13 replies
    Copy to Clipboard
  • m

    mike.holler

    4 months ago
    I've got a multiplatform project broken into multiple gradle submodules, some dependent on others. Can someone help me understand what this means?
    > Task :initech-multiplatform-base:compileTestDevelopmentExecutableKotlinJs
    w: duplicate library name: com.initech.cloudsdk:initech-multiplatform-base
    m
    2 replies
    Copy to Clipboard
  • v

    Vivek Modi

    4 months ago
    Hey guys, what is the benefits of using
    flow
    over normal
    list/muablelist
    in Kmm project? What is the benefits in ios platform?
    v
    m
    5 replies
    Copy to Clipboard
  • m

    mike.holler

    4 months ago
    My KMP builds completely max my CPU -- any way to reduce this on my local machine? I've tried
    --max-workers 2
    but even that still does it. PC is quality -- 8 CPUs i7 processor
    m
    Paul Woitaschek
    2 replies
    Copy to Clipboard
  • Trey

    Trey

    4 months ago
    I have some existing Android code that uses ticker from kotlinx.coroutines.channels. It doesn't appear to be available for use in commonMain with KMM since it is declared in kotlinx-coroutines-core-jvm. Is there a way for me to use that in commonMain or is there an alternative?
    Trey
    e
    8 replies
    Copy to Clipboard
  • e

    eygraber

    4 months ago
    I have an android target in my multiplatform build, and each module spams the logs with:
    The following Kotlin source sets were configured but not added to any Kotlin compilation:
     * androidAndroidTestRelease
     * androidTestFixtures
     * androidTestFixturesDebug
     * androidTestFixturesRelease
    You can add a source set to a target's compilation by connecting it with the compilation's default source set using 'dependsOn'.
    See <https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#connecting-source-sets>
    What do I need to do to make that stop getting logged?
    e
    Siggi Gunnarss
    +1
    5 replies
    Copy to Clipboard