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 using generators with SPM #796

Open
muratyilmaz opened this issue Dec 27, 2022 · 5 comments
Open

Rswift 7 using generators with SPM #796

muratyilmaz opened this issue Dec 27, 2022 · 5 comments

Comments

@muratyilmaz
Copy link

Can I use specific generators with RswiftGeneratePublicResources/RswiftGenerateInternalResources?

@tomlokhorst
Copy link
Collaborator

Unfortunately no. When using these plugins, all generators are always used.
If you want to only use specific generators, you'll need to use the command line version.

@muratyilmaz
Copy link
Author

Thank you for your answer.
If I use RswiftGenerateResourcesCommand from Xcode, the generators work. But, with RswiftModifyXcodePackages, it does not. Could you let me know if you meant this?

Screen Shot 2022-12-27 at 20 03 50

@tomlokhorst
Copy link
Collaborator

Oh right, I forgot about the RswiftGenerateResourcesCommand 😆
Yes, you can use that, it should work correctly. You will need to run that again, each time you add or remove resources.

RswiftModifyXcodePackages is only meant to be run once, when adding a Build Tool Plug-in.
It modifies the Xcode project, it does not itself run R.swift.

@muratyilmaz
Copy link
Author

Yep, like you said I need to run that again each time I add resources, and also I need to specify generators as arguments. Is there any way to automate this?

@muratyilmaz
Copy link
Author

Another question is that you said you can use commandline version. How can I use it with SPM? Do I need to add it to build phase?

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

2 participants