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

Bundling resources with Swift Package #122

Open
surajsau opened this issue Oct 19, 2022 · 4 comments
Open

Bundling resources with Swift Package #122

surajsau opened this issue Oct 19, 2022 · 4 comments

Comments

@surajsau
Copy link

Trying to publish a module with shared string resource over moko-resources. Internally moko-resources generates Resource files for iOS. However, upon running on device it throws Uncaught Kotlin exception: kotlin.IllegalArgumentException: bundle with identifier xx.xx.MR not found.

Moko resources suggest adding a command to copy over resources in build phase.

Would be nice to add resources field also added in Package.swift when doing spmDevBuild (Bundling resources with Swift Package)

@russhwolf
Copy link
Contributor

Is this an issue just for local builds with spmDevBuild, or also for binary builds? Can toggling between static and dynamic frameworks help?

@surajsau
Copy link
Author

surajsau commented Nov 9, 2022

I haven't tried it on binary builds but the issue was there for spmDevBuild.

@russhwolf
Copy link
Contributor

We have other priorities at the moment so probably won't get to this soon. But it should be possible to grab the updatePackageSwift task, call doLast {} or similar, and make edits manually.

@dalewking
Copy link

Just to be clear here, I think all that needs to happen is that there needs to be a way to bundle some resource files into the generated package. The command that copies them over in a monorepo build is just copying the contents of a directory into the target. That consists of some .lproj directories with Strings files, an Assests.xcassets directory and a files directory

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