OCUnit testing an embedded framework

Posted by d11wtq on Stack Overflow See other posts from Stack Overflow or by d11wtq
Published on 2010-05-19T16:01:17Z Indexed on 2010/05/19 16:40 UTC
Read the original article Hit count: 448

Filed under:
|
|
|
|

I've added a Unit Test target to my Xcode project but it fails to find my framework when it builds, saying:

Test.octest could not be loaded because a link error occurred. It is likely that dyld cannot locate a framework framework or library that the the test bundle was linked against, possibly because the framework or library had an incorrect install path at link time.

My framework (the main project target) is designed to be embedded and so has an install path of @executable_path/../Frameworks.

I've marked the framework as a direct dependency of the test target and I've added it to the "Link Binary with Libraries" build phase.

Additionally I've add a first step (after it's built the dependency) of "Copy Files" which simply copies the framework to the unit test bundle's Frameworks directory.

Anyone got any experience on this? I'm not sure what I've missed.

© Stack Overflow or respective owner

Related posts about xcode

Related posts about ocunit