maskipli
06/29/2021, 5:47 PMcocoapods {
summary = "Shared Module"
homepage = "Link to the Shared Module homepage"
ios.deploymentTarget = "14.1"
frameworkName = "shared"
podfile = project.file("../iosApp/Podfile")
}
sourceSets {
sourceSets["iOSMain"].dependencies {
implementation(Ktor.clientIos)
implementation(MVIKotlin.kotlin)
implementation(Decompose.decompose)
}
sourceSets["commonMain"].dependencies {
implementation(MVIKotlin.kotlin)
implementation(Decompose.decompose)
}
}
why i can't access class of MVI from ios project, like
ObservableValue, LifecycleRegistryKt
sample from https://github.com/JetBrains/compose-jb/tree/master/examples/todoappArkadii Ivanov
06/29/2021, 7:18 PMmaskipli
06/30/2021, 2:57 AMios {
// native.cocoapods Gradle plugin will declare
// the binary framework creation.
// Since, duplicate binary name is not supported,
// we need to configure the binary settings declared by
// native.cocoapods plugin to mark the dependency as an
// exported dependency.
binaries
.filterIsInstance<org.jetbrains.kotlin.gradle.plugin.mpp.Framework>()
.forEach {
it.transitiveExport = true
it.export(Decompose.decompose)
it.export(MVIKotlin.kotlin)
}
}
source : https://medium.com/wantedly-engineering/different-approaches-in-consuming-kmm-modules-in-ios-7957c722b114lehakorshun
06/30/2021, 4:27 AMtargets.withType(KotlinNativeTarget::class.java)
.all {
binaries.withType(org.jetbrains.kotlin.gradle.plugin.mpp.Framework::class.java)
.all {
freeCompilerArgs = freeCompilerArgs.plus("-Xobjc-generics").toMutableList()
export(Deps.Arkivanov.Decompose.iosArtifact)
export(Deps.Arkivanov.MviKotlin.iosArtifactMain)
export(Deps.Arkivanov.MviKotlin.iosArtifactLogging)
}
}
maskipli
06/30/2021, 5:51 AM