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

Include compose resources in SPM #19

Open
checoalejandro opened this issue Apr 2, 2024 · 5 comments
Open

Include compose resources in SPM #19

checoalejandro opened this issue Apr 2, 2024 · 5 comments

Comments

@checoalejandro
Copy link

How can I achive to include Jetbrains compose resources to be part of the generated SPM in a KMP project with composeResources/files folder, just like described here: Raw files.

When using same project as a pod, resources are passed as expected.

I would expect package to have Resources folder, and Package.swift to also detail as such.

Thanks.

multiplatform-swiftpackage version 2.2.2
kotlin 1.9.23
Compose 1.6.1

@luca992
Copy link
Owner

luca992 commented Apr 2, 2024

I've never played around with exporting resource files in a swift package. Do you know of any example swift projects that do that for reference? But fyi, I don't really have time to try and implement that right now, but prs are welcome.

@checoalejandro
Copy link
Author

checoalejandro commented Apr 2, 2024

I understand this is rare, we need to have a local server running for both platforms using ktor-server and some responses are part from a resource list. I will try to get a pr.

Thanks.

@dmikots
Copy link

dmikots commented Apr 27, 2024

@checoalejandro Do you have some news about Resources?

@checoalejandro
Copy link
Author

@checoalejandro Do you have some news about Resources?

Yes, I used moko-resources as it's based and those resources were included as expected in the SPM.

I also implemented an actual/expect to retrieve the content of the files based in file name, different from what moko resources does by using an object class. That last is more of a tip.

@dmikots
Copy link

dmikots commented Apr 27, 2024

@checoalejandro can you provide a sample project? this is a very important thing for us. I want to use compose multiplatform resources or another library. using only xcframework. without using cocoapods. The project needs fonts and pictures

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

3 participants