https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
m

Marc

10/05/2023, 7:54 AM
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

darkmoon_uk

10/05/2023, 8:55 AM
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

Marc

10/05/2023, 9:26 AM
removed it and rebuilt the project. still the same error
d

darkmoon_uk

10/05/2023, 10:00 AM
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

Marc

10/05/2023, 10:19 AM
Bildschirmfoto 2023-10-05 um 12.19.09.png
🤔 1
1
d

darkmoon_uk

10/05/2023, 10:21 AM
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

Marc

10/05/2023, 10:22 AM
how
d

darkmoon_uk

10/05/2023, 10:23 AM
Something like
./gradlew : shared:assembleXCFramework
From your project folder
You could also run this from the gradle task panel in your Jetbrains IDE
m

Marc

10/05/2023, 10:25 AM
Oh yes i tried that before already
d

darkmoon_uk

10/05/2023, 10:25 AM
That will be more convenient if you're not sure of the module or task name
Same output?
m

Marc

10/05/2023, 10:36 AM
yes
d

darkmoon_uk

10/05/2023, 10:48 AM
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

Marc

10/05/2023, 10:56 AM
works with kotlin 1.8.21 now 😄
🎉 1
thanks
👍 1
2 Views