-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ks classes were not generated ? Why? #55
Comments
try this steps:
|
Still same I executed ./gradlew clean command and went to xcode and then executed "clean build folder" and then "build" Then executed "pod install" Then executed "Rebuild project" in studio Still Ks Files not generated ? |
I am having the same issue. I have got a very simple sealed class like below which is located in shared/src/commonMain/kotlin/com/..
also tried with an interface, it's still the same:
Implementation:
|
Please refer this link Alex009/moko-mvvm-compose-swiftui#2 (comment) Fixed it |
My workaround import org.jetbrains.kotlin.gradle.plugin.mpp.Framework
import org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink
tasks.withType<KotlinNativeLink>()
.matching { it.binary is Framework }
.configureEach {
doLast {
val kSwiftGeneratedDir = destinationDirectory.get()
.dir("${binary.baseName}Swift")
.asFile
val kSwiftPodSourceDir = buildDir
.resolve("cocoapods")
.resolve("framework")
.resolve("${binary.baseName}Swift")
kSwiftGeneratedDir.copyRecursively(kSwiftPodSourceDir, overwrite = true)
println("[COPIED] $kSwiftGeneratedDir -> $kSwiftPodSourceDir")
}
}
|
Why LoginViewModelActionKs is not generated ? I am getting
Cannot find 'LoginViewModelActionKs' in scope
I added everything in the gradle . But still no Ks classes generated .
My gradle files:
project gradle
shared module gradle
please help me
The text was updated successfully, but these errors were encountered: