OCUnit testing an embedded framework
- by d11wtq
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.