Closed vdcast closed 7 months ago
It should work - I don't have Apple devices but others have tested it. One user has an app that you can find here to compare with your build: https://github.com/joreilly/FantasyPremierLeague
The error you are getting is for a missing "org.jetbrains.kotlin.native.platform.Symbols", so it looks like this isn't related to Koala Plot. Are you able to get a Compose iOS application to run without using Koala Plot?
yes, I can't build a project in Xcode once I've added the lib to commonMain dependencies. Same code works well on Android, but on IOS it doesn't.
Maybe I need to add the lib in Xcode manually? It seems like something can't share the lib to IOS target
Looks like this may be a bug in Kotlin multiplatform 1.9.10, see https://youtrack.jetbrains.com/issue/KT-63805. I would try upgrading to the latest, which is 1.9.22.
thanks for advice! I changed kotlin version to 1.9.20 and compose multiplatform version to 1.5.11. Now it works.
Hello! I've added lib to commonMain dependencies and it seems works well on Android app. When I'm trying to build an app via Xcode - it says Build Failed with error:
Could not find "org.jetbrains.kotlin.native.platform.Symbols" in [/Users/vdcast/111/DEV/Projects/MoneyWorksPersonal, /Users/vdcast/.konan/klib, /Users/vdcast/.konan/kotlin-native-prebuilt-macos-x86_64-1.9.10/klib/common, /Users/vdcast/.konan/kotlin-native-prebuilt-macos-x86_64-1.9.10/klib/platform/ios_arm64]
Do I need to add in in Xcode libraries? If yes - how to do it? Please, help me add it to IOS target correctly, ty!
Here is my build.gradle shared module:
`plugins { kotlin("multiplatform") id("com.android.library") id("org.jetbrains.compose") id("com.squareup.sqldelight") }
kotlin { androidTarget { compilations.all { kotlinOptions { jvmTarget = "17" } } }
}
android { compileSdk = (findProperty("android.compileSdk") as String).toInt() namespace = "com.vdcast.moneyworkspersonal"
}
sqldelight { database("AppDatabase") { packageName = "com.vdcast.moneyworkspersonal.data.database" sourceFolders = listOf("sqldelight") } }
dependencies { implementation("androidx.compose.material3:material3:1.1.2") implementation("androidx.core:core:1.10.1") commonMainApi("dev.icerock.moko:mvvm-core:0.16.1") commonMainApi("dev.icerock.moko:mvvm-compose:0.16.1") commonMainApi("dev.icerock.moko:mvvm-flow:0.16.1") commonMainApi("dev.icerock.moko:mvvm-flow-compose:0.16.1") }`
and build.gradle project:
buildscript { dependencies { classpath("com.android.tools.build:gradle:8.1.2") classpath("com.squareup.sqldelight:gradle-plugin:1.5.5") classpath("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.17.3") } } plugins { kotlin("multiplatform").apply(false) id("com.android.application").apply(false) id("com.android.library").apply(false) id("org.jetbrains.compose").apply(false) }
allprojects { apply(plugin = "kotlinx-atomicfu") }
repositories { mavenCentral() maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") }