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

iOS - Cannot find type 'FontResource' in scope #793

Open
softcleandev opened this issue Dec 13, 2024 · 0 comments
Open

iOS - Cannot find type 'FontResource' in scope #793

softcleandev opened this issue Dec 13, 2024 · 0 comments

Comments

@softcleandev
Copy link

softcleandev commented Dec 13, 2024

I've tried to use fonts in iOS and used an Font-Extension:

extension Font {
    init(resource: KeyPath<MR.fonts, FontResource>, withSize: Double = 14.0) {
        self.init(MR.fonts()[keyPath: resource].uiFont(withSize: withSize))
    }
}

but then an error occurs:
image

All fonts in MR have a data type ResourcesFontResource:
image

The same behavior applies to files and images
image

image

I'm using the 0.24.4 version.
Here is my "config" from build.gradle.kts:

multiplatformResources {
    resourcesPackage.set(libs.versions.core.packagename.get())
    iosBaseLocalizationRegion.set("en")
    iosMinimalDeploymentTarget.set(libs.versions.core.ios.deploymenttarget.get())
}

Could it be that I'm using moko-resources incorrectly or have overlooked something?

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

No branches or pull requests

1 participant