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

[Rswift 7][SPM] Cannot embed anymore R.generated in app #850

Open
dev-pac opened this issue Sep 14, 2023 · 3 comments
Open

[Rswift 7][SPM] Cannot embed anymore R.generated in app #850

dev-pac opened this issue Sep 14, 2023 · 3 comments

Comments

@dev-pac
Copy link

dev-pac commented Sep 14, 2023

Hi,
I used to use R.swift has a pod in my project, and embed the R.generated file into app so as to have all languages texts embedded and allow user to change app language on demand.
As for Rswift 7, preferred method is using SPM to add it to xcode project.
But with this method Rswift will generate the R.generate file into DerivedData/... folder, preventing project to embed it into app.

Is there a way to provide a command line argument to the Rswift generator to specify a destination path ?

@rafalwojcik
Copy link

Same problem here. I was generating some additional things based on assets using Sourcery. Since now the generated file doesn't live in the project file sourcery can't read it :/

@tomlokhorst
Copy link
Collaborator

With Rswift 7, you can still call it from the command line and pass any required arguments.

You can also use the manual version of the generator, that only runs when you right click on a project and click RswiftGenerateResourcesCommand.

These options aren't available when using the Built Tool Plug-in generators.
So it's either fully automatic, or manual and customisable.

@tomlokhorst
Copy link
Collaborator

Maybe possible to call the RswiftGenerateResourcesCommand SPM plugin from a Run Script in an Xcode target? I haven't tried that.

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