Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I copy/sync the Xcode "Link Library with Libraries" phase between different build targets

Tags:

xcode

I am trying to figure out an easier way to copy/sync the list of frameworks for the linker build phase in XCode. I know I can duplicate targets in Xcode, but, this is for creating a new Cocoa Touch Unit Testing Bundle target.

Creating a new unit test target creates a linker build phase with just SenTestingKit.framework, UIKit.framework, Foundation.framework. I then have to manually add a number of frameworks.

This is a pain because I maintain a phonegap/cordova plugin and want to make it easy for other people to run my unit tests in their phonegap/cordova project that uses my plugin.

Is there a clever way to drag-n-drop linker items between targets in XCode? Or can I push all the linker items into the project file from a command line call?

like image 401
Steve Jansen Avatar asked Aug 09 '13 17:08

Steve Jansen


1 Answers

There is a very simple way to do this. Add frameworks to one target, the frameworks will appear in the project navigator window (the left window). Select the framework and look at the File Inspector window, you can see the target in the "Target Membership" list. Just click on the other targets and you have the framework linked in the other targets.

I hope this helps.

like image 154
Eva Madrazo Avatar answered Oct 19 '22 02:10

Eva Madrazo