I want to use the same code for different target in Xcode. I am able to create the target using the Duplicate method and then I am able to change scheme name as well.
Now the real scenario comes, I want to be use my code in centralised way like for new target, I don't want to copy and paste the Main.storyboard and xib as well, so, ideally what would happen, if I would change anything in one place, all target would share that.But the issue comes, that ``ViewControllerin
Main.Storyboard` holds the master project "module" so, when I run the child target, it could not run.
Xcode defines a special type of target that lets you build a group of targets at once, even if those targets do not depend on each other. An aggregate target has no associated product and no build rules. Instead, an aggregate target depends on each of the targets you want to build together.
You can open Utilities panel, select File inspector tab and mark necessary targets for every file you want to share. See attached image as a reference.
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