0

I am using XCode 4.3.3 and want to include custom frameworks (in my case OCMock) into my Mac OS X project. I have put OCMock.framework (version 2.0) into /Library/Frameworks for now and when I open the build phases tab for my unit testing target that I want to link against OCMock I have the option to add the framework here:

Link Frameworks

When I click the + button I get presented with a search dialog that I can use to search for frameworks. /Library/Frameworks is not being searched for here.

Search Frameworks

It just searches the frameworks directory inside XCode.app and the Mac OS X 10.7 SDK which I am building the project with.

So how can I extend the search dialog with more locations, for example, /Library/Frameworks so that I can easily search for and include OCMock.framework?

malte
  • 190
  • 1
  • 10

1 Answers1

3

Don't place the framework in system directories. Instead, drag it into the Project Navigator in Xcode, and tell Xcode to copy the files into the project folder. Once a framework has been added to the project's files, you can drag it from the navigator into the Link Binary With Libraries build phase.

Carter Allen
  • 1,984
  • 15
  • 22
  • So custom frameworks are encouraged to be packaged together with a project? Is the reason for this to ensure portability of the project? – malte Jun 21 '12 at 21:22
  • I can't speak to why it was set up that way, but it is much better for portability. – Carter Allen Jun 23 '12 at 22:20