Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding project as dependency in XCode 4.x

With the revamp of XCode I am having a lot of trouble working out how to add make one xcodeproj dependent on another. It was hard enough to work out before but now I am just stuck.

If I drag lib.xcodeproj into app.xcodeproj it just shows up as an item in the project tree and I can't expand it or see build products for linking.

Can someone give me the correct sequence for adding lib.xcodeproj as a dependency to app.xcodeproj (ie it will build if necessary and link to app)

like image 622
intepid Avatar asked Mar 21 '11 02:03

intepid


People also ask

How do I integrate one project to another file in Xcode?

drag and drop xcode file to another xcode file from finder. It will ask you for copy the file then check the check box and it will copy to your project.


1 Answers

Ahhh just worked out that the reason the lib project was being added as a useless non-expanding item was because I had the lib project open in another window. XCode gave me no indication that this was what the problem was, so I was lucky to stumble across it.

Once I had closed the other window I was able to add the lib project and it showed up correctly as an expandable subtree, as well as now being visible for selection in the app target dependencies.

like image 108
intepid Avatar answered Oct 05 '22 16:10

intepid