Getting below error when trying to compile KMM lib...
# multiplatform
s
Getting below error when trying to compile KMM lib on Xcode 15 Beta 7
Copy code
The /Applications/Xcode-15.0.0-Beta.7.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld command returned non-zero exit code: 1.
output:
ld: unknown options: -ios_simulator_version_min -sdk_version
FAILURE: Build failed with an exception.
``````
j
Should have been fixed in Kotlin 1.9.10 https://youtrack.jetbrains.com/issue/KT-60230
s
using Kotlin 1.7.20, any workarounds to resolve without update to 1.9.10?
j
yeah, there's a workaround mentioned in the issue that I had been using before as well
s
tried the solution but didn't worked
Copy code
targetList.forEach {
    it.binaries.framework(frameworkName, nativeBuildTypes) {
    // TODO: remove this once Kotlin 1.9.10 fixes this
        if (System.getenv("XCODE_VERSION_MAJOR") == "1500") {
            linkerOpts.plusAssign("-ld64")
        }
    }
j
following was PR where I removed the workaround if it helps to see what was there (using .kts in my case) https://github.com/joreilly/PeopleInSpace/pull/243/files
s
it works, if I remove the Xcode version check if
(System.getenv("XCODE_VERSION_MAJOR") == "1500")
@John O'Reilly is there any possible way to add the Xcode version check so Xcode 14 also works fine?
175 Views