Closed matteinn closed 2 years ago
to use kotlin methods from swift you should add library to export. https://kotlinlang.org/docs/multiplatform-build-native-binaries.html#export-dependencies-to-binaries
sample: https://github.com/icerockdev/moko-resources/blob/master/sample/mpp-hierarhical/build.gradle.kts#L49
Thanks, that indeed fixed the issue!
Hi, @matteinn I face the same issue And I can't fix it by @Alex009 's answer Could you show me how did you fix it? Thx.
@applepeopletsai in the end I was only missing the export statement shown below. Hope it solves your error too
kotlin {
....
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach {
it.binaries.framework {
baseName = "shared"
export("dev.icerock.moko:resources:$mokoResourcesVersion")
}
}
...
}
WOW!! It's working Thank you very much You save my day :)
Hi there! I'm trying to integrate the library in a KMM project and I'm facing some issues with the usage on the iOS app (integrated via "iOS framework distribution": "Regular framework").
Here's the error:
Value of type 'ResourcesStringResource' has no member 'desc'
I'm attaching the empty project generated by AS with the only addition of moko-resources that demonstrates the issue: ABC.zip
Are there any other steps needed?
If I also apply what's mentioned in https://github.com/icerockdev/moko-resources#static-kotlin-frameworks-support (which I believe it's necessary) then I get another error during that build phase:
Task 'copyFrameworkResourcesToApp' not found in project ':shared'.
Hence I suspect that the readme might be missing some crucial information.
Thanks in advance