Dzm*_*lau 7 ios kotlin swift kotlin-multiplatform
我遇到了 iOs 应用程序无法通过提供的 ID 获取共享字符串资源的问题。ios 和 kmp 模块位于不同的存储库中
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach {
it.binaries.framework {
baseName = SHARE_BINARY_NAME
export(libs.moko.shared.resources)
}
}
Run Code Online (Sandbox Code Playgroud)
Strings().get(SharedRes.strings().string_resId)在构建的框架中,我可以看到shared.bundle生成的字符串。
结果我收到异常:
kotlin.IllegalArgumentException: bundle with identifier com.example.shared.MR not found