I get this error when I try to build my iOS Projec...
# multiplatform
m
I get this error when I try to build my iOS Project in XCode.
Copy code
e: Could not find "org.jetbrains.kotlin.native.platform.CoreFoundationBase" in [/ProjectRoot/iosApp/Pods, ~/.konan/klib, ~/.konan/kotlin-native-prebuilt-macos-aarch64-1.7.21/klib/common, ~/.konan/kotlin-native-prebuilt-macos-aarch64-1.7.21/klib/platform/ios_simulator_arm64]
d
Suggest deleting your
.konan
folder, in case this is the result of an incomplete Konan download or cache corruption.
Kotlin will prepare it again on the next compile.
m
removed it and rebuilt the project. still the same error
d
Try installing and running kdoctor
That is a Jetbrains official checker for Multiplatform programming environment
I think it's in homebrew,
brew install kdoctor
m
Bildschirmfoto 2023-10-05 um 12.19.09.png
🤔 1
1
d
Xcode's own shell invocations are more... protected and can be different to your general local shell.
May be worth running an iOS Grade build task from CLI to eliminate Xcode vs shell differences.
m
how
d
Something like
./gradlew : shared:assembleXCFramework
From your project folder
You could also run this from the gradle task panel in your Jetbrains IDE
m
Oh yes i tried that before already
d
That will be more convenient if you're not sure of the module or task name
Same output?
m
yes
d
I wonder if there's a compatibility drift between the version of Xcode you're using and Kotlin
Since Kotlin 1.7.21 is relatively old in this fast-moving ecosystem.
If you're using Xcode 14.3, I would recommend using Kotlin 1.8.21
m
works with kotlin 1.8.21 now 😄
🎉 1
thanks
👍 1