• m

    MarkRS

    10 months ago
    Is it hoping for too much to want to see Kotlin classes from the common module in the variables window in the XCode debugger?
    m
    t
    8 replies
    Copy to Clipboard
  • Alexander Suraphel

    Alexander Suraphel

    10 months ago
    hi all, i’m going to start a multiplatform project. Targeting Android and Desktop now, ios shortly after. Is https://kotlinlang.org/docs/kmm-setup.html up to date?
    Alexander Suraphel
    mbonnin
    +1
    17 replies
    Copy to Clipboard
  • s

    Skolson5903

    10 months ago
    Does anyone know the Intellij Idea youtrack issue URL or number for the problem with the IDE showing a false syntax error on any usage of an actual fun that doesn't specify a parameter with a default value in the expect definition? I've got a number of these and would like to start watching the issue that must be out there, but my searches are not finding it. To clarify, here's an example of the defect with a constructor, same thing happens on expect/actual fun:
    expect class Anything(
        arg1: String,
        arg2: String = ""
    ) { ... }
    
    actual class Anything(
        arg1: String,
        arg2: String
    ) { ... }
    
    val x = Anything("x")
    Every usage like this compiles fine in gradle and runs fine, but the IDE wrongly shows the assignment statement as a syntax error. The IDE inspection is going by the actual syntax which is not allowed to duplicate the default value defined in the expect. I have enough of these that the IDE defect is making me never want to use arguments with default values in an expect class again 😃
    s
    1 replies
    Copy to Clipboard
  • xxfast

    xxfast

    10 months ago
    Hi all, pretty new to ios kmm development. I’ve recently migrated my project from old
    packForXCode
    to
    embedAndSignAppleFrameworkForXcode
    , and ever since all the kotlin sources in my swift fails will
    error: ambiguous use of 'myKotlinClass'
    Am no longer able to jump to definitions of any of my kotlin objects - and pretty sure something went wrong with the new linkages. Is there a way to debug this? using kotlin
    1.5.31
    xxfast
    1 replies
    Copy to Clipboard
  • oianmol

    oianmol

    10 months ago
    Is there support for gRPC in kotlin multiplatform ? anyone ?
    oianmol
    Mike Wolfson
    2 replies
    Copy to Clipboard
  • e

    edwinRNDR

    9 months ago
    how do I fix missing javadoc jar errors on maven central?
    e
    p
    +1
    13 replies
    Copy to Clipboard
  • d

    darkmoon_uk

    9 months ago
    Do we have any support for specifying Java Modules (Jigsaw) in a KMP JVM target? I'm compiling against Java 11 and need to use an AWT class from my desktop (JVM) target and it's not on the classpath due to being separated from the main SDK as a module.
    d
    mbonnin
    2 replies
    Copy to Clipboard
  • Rahul Rawat

    Rahul Rawat

    9 months ago
    Can anyone help out with the following error I am getting in sqldelight for nativeMain desktop containing all three(mac, linux and mingw) as targets? Following is my declaration in source sets for nativeMain
    val nativeMain by getting {
                dependencies {
                    implementation("io.ktor:ktor-client-curl:$ktorVersion")
                    implementation("com.squareup.sqldelight:native-driver:$sqlDelightVersion")
                }
            }
    Rahul Rawat
    1 replies
    Copy to Clipboard
  • Hannes

    Hannes

    9 months ago
    Hey folks, I am trying to use
    native.cocoa
    plugin as described here:https://kotlinlang.org/docs/native-cocoapods.html#install-the-cocoapods-dependency-manager-and-plugin I’m just trying the code snipped from the docs to use
    AFNetworking
    inside iOSMain (as described in the docs).
    kotlin {
       ...
        cocoapods {
            summary = "Some description for the Shared Module"
            homepage = "Link to the Shared Module homepage"
            ios.deploymentTarget = "14.1"
            frameworkName = "sharedClient"
            podfile = project.file("../iosClient/Podfile")
    
            pod("AFNetworking") {
                version = "~> 4.0.1"
            }
        }
        ...
    }
    The problem I am facing right now is that
    cinteropAFNetworkingIos
    fails:
    Task
    😒haredClient:cinteropAFNetworkingIos Exception in thread “main” java.lang.Error: /var/folders/n9/5pkml05d7mn3xzdyty8cx5380000gn/T/3707914287112298431.m1️⃣9: fatal error: could not build module ‘AFNetworking’
    at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:192)
    at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesASTFiles(ModuleSupport.kt:68)
    at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesInfo(ModuleSupport.kt:14)
    at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.buildNativeLibrary(main.kt:531)
    at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:268)
    at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:76)
    at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:45)
    at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:38)
    at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:60)
    Task
    😒haredClient:cinteropAFNetworkingIos FAILED
    I think it is more of a cocoa pods issue on my local machine, but I don’t really know how cocoa pods works exactly under the hood. I think cocoa pods did not download AFNetworking. (In a plain iOS / xcode project (not kotlin multiplatform app) I have used successfully cocoa pods, so I think it is fair to assume the required cocoa pods gems are installed on my machine.) Could anyone please point me in the right direction?
    Hannes
    j
    +1
    6 replies
    Copy to Clipboard
  • Stefan Oltmann

    Stefan Oltmann

    9 months ago
    My method takes a
    val requestSystemPhotoLibraryAccessPermission: suspend () -> SystemPhotoLibraryAccessLevel
    suspend lambda. What is the correct way to call this in Swift?
    requestSystemPhotoLibraryAccessPermission: {}
    gives me an error as soon as I add the suspend keyword:
    Argument type '() -> ()' does not conform to expected type 'KotlinSuspendFunction0'
    What do I need to change? I don't understand that from the docs. 🙈
    Stefan Oltmann
    hfhbd
    9 replies
    Copy to Clipboard