LighthouseGames / KmLogging

Kotlin multiplatform logging. High performance, composable and simple to use.
Apache License 2.0
84 stars 13 forks source link

Build failed for iOS in Multiplatform project #17

Closed mwasserthal closed 7 months ago

mwasserthal commented 1 year ago

Hi,

So we tried setting up the logging for our multiplatform project.

When syncing and building the android app it all worked as expected. The iOS app on the other side fails to build and ends up with the following error:

e: Could not find "org.jetbrains.kotlin.native.platform.CoreFoundationBase" in [/Users/username/StudioProjects/app, /Users/username/.konan/klib, /Users/username/.konan/kotlin-native-prebuilt-macos-aarch64-1.7.10/klib/common, /Users/username/.konan/kotlin-native-prebuilt-macos-aarch64-1.7.10/klib/platform/ios_arm64]

I can also provide the stacktrace to it if needed. The app was built on an M1 Mac for the targets X64, Arm64, SimulatorArm64

We are currently working with kotlin version 1.7.10 and the current version of KmLoggin (1.3.0)

In our build.gradle.kts we add the dependency like this:

sourceSets { val commonMain by getting { dependencies { dependencies { api(libs.bundles.ktor) implementation(libs.kotlinx.coroutines.core) api(libs.logging.kmlogging.multiplatform) } } } }

Could this be a problem with our configuration or is there a minimum version of another dependency that we should look out for?

Best Regards

jonasvogel commented 1 year ago

I solved this issue by downgrading the SDK to 1.2.0 (see https://github.com/LighthouseGames/KmLogging/releases) to support Kotlin 1.7.x.

ellsworthrw commented 7 months ago

I will update the readme for the version of kotlin that should be used with each version.