-
Notifications
You must be signed in to change notification settings - Fork 766
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
Multiple commands produce 'xxx/RswiftGeneratePublicResources/xxx/R.generated.swift' #815
Comments
i have the same error, but i delete old R.generated.swift file and then rebuild project success |
I use 7.3.0, which does not need to add R.geratated.swift to your target, only need to add script in accordance with SPM access steps to build and then R.xxx can used. It is worth noting that the name of the struct is changed to _R, and the Struct can extension with _R struct. |
@SpectatorNan unfortunetely, this doesn't solve the problem for me since I use SPM where storing this file is out of my control. |
@tomlokhorst here is minimal reproducible example. Don't you know, what could be wrong? |
Thanks for the minimal reproducible example, that is very useful! I'm no expert on the Xcode build system, so I'm not exactly sure what's going on. But I did manage to the the example building, with some changes:
Again, I'm not exactly sure, but I think the difference with this indirection is that the new framework is dynamically linked, and the original Strings library was statically linked (twice). |
Anyone able to find the root cause of this issue? |
@saltyskip Creating two different targets overcomes the problem (see my question on SO). Eventough it doesnt solve it as I would like to, I don't know any better solution so far. If you need to have targets |
Hello,
I have iOS app which has embedded watchOS app. I also have SPM package which runs R.swift plugin:
This package is added to both targets: the main iOS app and its embedded watchOS app. Unfortunately, I am unable to build the app since I receive the error
Multiple commands produce 'xxx/RswiftGeneratePublicResources/xxx/R.generated.swift'
When I remove watchOS app from target dependencies of iOS app, it works, but then iOS app can't be built. Don't you know what could be wrong?
Thank you!
The text was updated successfully, but these errors were encountered: