Hello, i’m wondering if someone might be able to a...
# multiplatform
n
Hello, i’m wondering if someone might be able to assist with a KMM issue im experiencing since upgrading Kotlin from
1.5.21
->
1.5.30
… The issue im experiencing is specifically with
packForXcode
where Gradle is returning an error messae all of a sudden
Copy code
* What went wrong:
Could not create task ':mobile-shared:packForXcode'.
> Key releaseFramework is missing in the map.
I have had a look around online first for solutions, but really can’t see any resolutions or hints to point me in the right direction. Anyone have any ideas? I’ll post my
packForXcode
task as a thread comment.
Copy code
val packForXcode by tasks.creating {
    dependsOn(deleteXcFramework)
    group = "build"
    val mode = "Release"
    val frameworks = arrayOf("iosArm64", "iosX64")
        .map { kotlin.targets.getByName<KotlinNativeTarget>(it).binaries.getFramework(mode) }
    inputs.property("mode", mode)
    dependsOn(frameworks.map { it.linkTask })
    doLast {
        buildXcFramework(frameworks)
    }
}
a
I’ve seen similar error here and here. Could you please check if your XCFramework’s name is set to be the same as the baseName of your single-target frameworks’.
n
You may need to use the new updated embedAndSignFramework task instead of packForXcode task: https://blog.jetbrains.com/kotlin/2021/07/multiplatform-gradle-plugin-improved-for-connecting-kmm-modules/
👌 1