Created recent venture in compose multiplatform. Ios emulator labored positive and builds.
after that I added Gitlive library it stopped working. That is my construct gradle:
import org.jetbrains.compose.desktop.software.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidApplication)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
}
kotlin {
androidTarget {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
}
}
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach { iosTarget ->
iosTarget.binaries.framework {
baseName = "ComposeApp"
isStatic = true
}
}
sourceSets {
androidMain.dependencies {
implementation(compose.preview)
implementation(libs.androidx.exercise.compose)
}
commonMain.dependencies {
implementation(compose.runtime)
implementation(compose.basis)
implementation(compose.materials)
implementation(compose.ui)
implementation(compose.elements.assets)
implementation(compose.elements.uiToolingPreview)
implementation(libs.androidx.lifecycle.viewmodel)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.kmpnotifier)
implementation("dev.gitlive:firebase-database:2.1.0")
}
}
}
android {
namespace = "com.world.bojkot"
compileSdk = libs.variations.android.compileSdk.get().toInt()
defaultConfig {
applicationId = "com.world.bojkot"
minSdk = libs.variations.android.minSdk.get().toInt()
targetSdk = libs.variations.android.targetSdk.get().toInt()
versionCode = 1
versionName = "1.0"
}
packaging {
assets {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
buildTypes {
getByName("launch") {
isMinifyEnabled = false
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
dependencies {
debugImplementation(compose.uiTooling)
}
so the ONLY LINE I added is:
implementation("dev.gitlive:firebase-database:2.1.0")
earlier than it labored after that, IOS can’t construct. Xcode offers 2 errors:
1)Undefined image: OBJC_CLASS$_FIRDatabase
2)Linker command failed with exit code 1 (use -v to see invocation)