Hello, I just tried to update to Kotlin 1.4.30. Do...
# ios
s
Hello, I just tried to update to Kotlin 1.4.30. Doing that breaks the iOS Builds with the following error:
Copy code
Execution failed for task ':shared:linkDebugFrameworkIosX64'.
> Following dependencies exported in the debugFramework binary are not specified as API-dependencies of a corresponding source set:
  
  Project :dreimultiplatform
  
  Please add them in the API-dependencies and rerun the build.
build.gradle:
Copy code
ios("ios") {
        binaries.withType(org.jetbrains.kotlin.gradle.plugin.mpp.Framework).all {
            transitiveExport = true
            export(project(":dreimultiplatform"))
        }
    }

    cocoapods {
        // Configure fields required by CocoaPods.
        summary = "Multiplatform Redux Sample"
        homepage = "<https://github.com/dreipol/multiplatform-redux-sample>"
        ios.deploymentTarget = "13.0"
        frameworkName = "ReduxSampleShared"
    }

    sourceSets["commonMain"].dependencies {
        api project(":dreimultiplatform")
}
Before it used to work. Does anyone had the same problem?
p
Hi, I am facing a similar problem, have you found a solution?
s
Yes. The problem was, that different Kotlin or other dependency versions where used in the api project and the project itself. Just be sure that you use the same versions everywhere kotlin and thirdparty dependencies like ktor….
p
So if this is the case we get a random error in the iOS like the above? This is very hard to debug.
s
Unfortunately yes. 🙂
p
Thirdparty dependencies like ktor should have a match with Main project if they are added as “implementation” at the “api” project?
s
So if you use ktor in the main project and the api project, they should have the same version. I don’t know if that is true for all dependencies, but that’s how we fixed it in our case.
👍 1
p
It is surely a field/feature that has a lot of development. It is also super important because people would like to reuse its KMM modules