Hi folks! Does anyone know how to override the platform created from the Shared module?
In these last weeks, I went through the Get Started with Kotlin Multiplatform Tutorial, but today, I wanted to consume the flow from Swift configuring KMP-NativeCoroutines; before starting, my XCode asked me to update my iOS SDK from 17.4 to 17.5; after the update was installed, I opened the
iosApp
project and suddenly I started to receive this error:
/GreetingKMP/iosApp/iosApp/ContentView.swift:2:8: error: cannot load module 'Shared' built with SDK 'iphonesimulator17.4' when using SDK 'iphonesimulator17.5
/GreetingKMP/shared/build/xcode-frameworks/Debug/iphonesimulator17.5/Shared.framework/Modules/Shared.swiftmodule/arm64-apple-ios-simulator.swiftmodule import Shared
To solve the issue, I considered recreating the platform. I invalidated caches and rebuilt the shared module and the XCode project several times without success; in the end, changing the
baseName made it work!
iosTarget.binaries.framework {
baseName = "DevShared" // <<-- I changed this name from "Shared"
isStatic = true
}