I know that it is possible to add files to only some targets: Adding files to separate targets in Xcode 4
But is it possible to have multiple different version of a file (same name and path) included in an Xcode project - one for each target?
E.g. I have some images that are different from the target, but it is annoying that I have to replace the files each time I want to build another target.
How to solve this? In Android with Gradle you have different folders included after each target, but I haven't been able to find something similar.
Solved by answer but please note this comment:
Important lesson learn: Do not have a reference folder with same name as Target!!! You will get strange compile error that seems to have no relation to the problem. (e.g. unable to open executable ''
)
It works pretty much as you describe. You can create folders where you organize the files that are specific to targets and then make them part of the target or not by whether they're in a build phase for that target.
You really can't have two different files with exactly the "same name and path". Same name and parallel path, though, is fine.
Inside Xcode, you can make it obvious what's happening by having per-target groups that match the separated folders.