Targets and dependencies

It's been a while since I've added a new target to a project. In the past, if I want my new target to use code from the original target, I've had to manually add the required source files and resources in the "Build Phases" tab, which can be tedious and error-prone.


Is there an easy way to give the new target access to everything from the old target?


I tried adding the old target under Dependencies. This seems to have almost worked. My code will compile, but fails at the linker stage with an Undefined Symbol error referencing an Objective-C class that is in the old target.


Thanks,

Frank

Replies

May be I miss something.


But I simply do it in IB:

- select the file I want to share in the file brower panel,

- select File inspector

- In the Target Membership section, select the targets I want it in.

Thanks, I know how to do that... what I was wondering is whether I could share all the files at once without having to do this individually.

Not sure that will answer the question.


If you select all the files you need to share (in IB file browser panel) and open the file Inspector, then you can set the same target to all at once.