Skip to content
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

Localized strings is not available on iOS if iOS-framework was compiled by Gradle FatFramework task #75

Closed
romanandreyvich opened this issue May 7, 2020 · 2 comments · Fixed by #83
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@romanandreyvich
Copy link

When I use Gradle FatFramework task, I can't see any of my localized strings on iOS side
The task I use to compile my framework:

val fatFramework by tasks.creating(FatFrameworkTask::class) {
    baseName = "multiplatform"

    val targets = listOf(
            kotlin.targets.getByName<KotlinNativeTarget>("iosX64"),
            kotlin.targets.getByName<KotlinNativeTarget>("iosArm64")
    )

    from(targets.map { it.binaries.getFramework("DEBUG") })
}

If I change it to Gradle Sync task it works as expected (I see all my strings on iOS side):

val syncFramework by tasks.creating(Sync::class) {
    val targetDir = File(buildDir, "frameworks")
    val mode = "DEBUG"
    val framework = kotlin.targets
            .getByName<KotlinNativeTarget>("ios")
            .binaries.getFramework(mode)
    inputs.property("mode", mode)
    dependsOn(framework.linkTask)
    from({ framework.outputDirectory })
    into(targetDir)
}

Kotlin 1.3.72, moko-resources 0.10.0 (had the same issue on 0.9.1)

Do you have any ideas what a cause of the issue? And am I able to fix it?

@Alex009
Copy link
Member

Alex009 commented May 26, 2020

hi!
reason of it is internal implementation of FatFrameworkTask - this task not copy resource files of frameworks. I think we should add to our gradle plugin extended FatFrameworkTask implementation, which will copy all resources too.

@Alex009 Alex009 added the enhancement New feature or request label May 26, 2020
@Alex009 Alex009 added this to the 0.10.1 milestone May 26, 2020
@Alex009 Alex009 linked a pull request Jun 2, 2020 that will close this issue
Alex009 added a commit that referenced this issue Jun 2, 2020
@Alex009
Copy link
Member

Alex009 commented Jun 2, 2020

merged, will be available in next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants