I have a main target that have certain files included under its target -> Build Phases -> Compile Sources. I'm starting a unit test and would like the unit test to include the same files as the main target. Is there a way to copy and paste the files included in one target to another target?
Yes, you can follow these steps:
CMD
+ Shift
+ j
). The files will be selected in the left pane.Xcode 9.2 Update:
It looks like in Xcode 9.2 you can select only up to 150 items at once to use Drag and drop. If you want to copy more items you can do it in batches.
You can edit the PBXSourcesBuildPhase section in your ".pbxproj" file. You cand find the file by looking into your ".xcodeproj" file ( right click the project file + show package contents ). After you find the file look for "PBXSourcesBuildPhase". After you find the collection you can just copy/paste source files from one target to the others.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With