moko-kswift icon indicating copy to clipboard operation
moko-kswift copied to clipboard

Kotlin 2.0 on link step crash

Open ExNDY opened this issue 1 year ago • 7 comments

When i'm try run ios app i'm get crash with this error:

> Task :mpp-library:linkPodDebugFrameworkIosSimulatorArm64
warning: Cannot infer a bundle ID from packages of source files and exported dependencies, use the bundle name instead: MultiPlatformLibrary. Please specify the bundle ID explicitly using the -Xbinary=bundleId=<id> compiler flag.
w: KLIB resolver: Skipping '/Users/exndy/.gradle/caches/modules-2/files-2.1/org.jetbrains.skiko/skiko-iossimulatorarm64/0.8.4/15291c09538e8f22b232a76062b16a88afe161c8/skiko-cinterop-uikit.klib'. The library requires unknown IR provider: kotlin.native.cinterop
e: KLIB resolver: Could not find "/Users/exndy/.gradle/caches/modules-2/files-2.1/org.jetbrains.skiko/skiko-iossimulatorarm64/0.8.4/15291c09538e8f22b232a76062b16a88afe161c8/skiko-cinterop-uikit.klib" in [/Users/exndy/Documents/Projects/KMM/friday/ios-app/Pods]

For fix, i need disable kswift plugin in my project

ExNDY avatar May 24 '24 10:05 ExNDY

I am actually getting this error already when running ./gradlew kSwiftsharedPodspec.

Edit:

@ExNDY What do you mean by disabling the kswift plugin? Does that effectively mean the library is unusable or did you manage to solve it?

mr-kew avatar Jun 07 '24 20:06 mr-kew

For my project doesn't need more kswift. This issue create for report problem.

ExNDY avatar Jun 11 '24 05:06 ExNDY

I have the same issue with moko-kswift 7.0.0 and previous versions as well. This happens whenever I try to assemble xcframework using with ./gradlew assembleFrameworkNameDebugXCFramework.

However, in my case error indicates different cinterop library:

w: KLIB resolver: Skipping '/Users/<user>/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-utils-iosarm64/2.3.12/d29788d387943aa44bed7360a2fd4d80745cfe80/ktor-utils-cinterop-threadUtils.klib'. The library requires unknown IR provider: kotlin.native.cinterop
e: KLIB resolver: Could not find "/Users/<user>/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-utils-iosarm64/2.3.12/d29788d387943aa44bed7360a2fd4d80745cfe80/ktor-utils-cinterop-threadUtils.klib"

If I disable moko-kswift - everything compiles just fine.

Is there any quick workaround to fix this?

OSemenovBoyarka avatar Jul 18 '24 20:07 OSemenovBoyarka

@OSemenovBoyarka I also did not manage to solve it and decided to not use this library. I used SKIE instead.

mr-kew avatar Jul 18 '24 20:07 mr-kew

@OSemenovBoyarka I have the same issue..

harunagic avatar Dec 12 '24 16:12 harunagic

During the integration process, initial attempts to incorporate this library using the legacy plugin application method proved unsuccessful. Subsequently, implementation via the Plugins DSL approach was attempted, yielding comparable errors:

w: KLIB resolver: Skipping '/Users/kenkoro/.gradle/caches/modules-2/files-2.1/dev.icerock.moko/resources-iosarm64/0.25.0/63f201fe2a4753abcedbbbd452775e24da268081/resources-cinterop-bundleSearcher.klib'. The library requires unknown IR provider: kotlin.native.cinterop
e: KLIB resolver: Could not find "/Users/kenkoro/.gradle/caches/modules-2/files-2.1/dev.icerock.moko/resources-iosarm64/0.25.0/63f201fe2a4753abcedbbbd452775e24da268081/resources-cinterop-bundleSearcher.klib" in [/Users/kenkoro/Dev/home.gt/gh-clone-icerock]

Based on empirical observations from addressing similar compatibility challenges, the SKIE library demonstrates potential as an effective solution for this specific technical scenario.

kenkoro avatar Sep 05 '25 11:09 kenkoro

we migrate in our projects to SKIE. i not see any reason to support moko-kswift when SKIE provide more stable and improved solution

Alex009 avatar Sep 08 '25 03:09 Alex009