I would like to have the following structure:
If in Package.swift if I configure Target1 to use Sources/Target1 and Sources/Shared, and Target2 to use Sources/Target2 and Sources/Shared, I get an error that the same source is present in 2 different targets, and thus I can't generate an Xcode project.
Is there any reason for this limitation? I can understand that the ideal setup would be to create a new Shared target and make that as a dependency of Target1 and Target2, but sadly the Shared code is generated, and it doesn't include the appropriate visibility modifiers for the classes to be accessible by dependents.
My workaround is generating the files into each of Target1 and Target2, but this is obviously way dirtier than sharing the sources between multiple targets.