I am trying to add OCMock to my existing Cocoa project, but I am running to a strange problem that I do not see anyone else close.
I finally split it into the following: if I just add the OCMock.framework link to my project (i.e. drag it somehow into the binary link build phase) when I run the tests, the real application runs instead.
Without OCMock, the output is normal:
Test Suite 'Multiple Selected Tests' started at 2013-02-07 20:07:03 +0000
With a link to the OC Framework (partial output):
Error loading MyProjTests.octest/Contents/MacOS/MyProjTests Library not loaded: @rpath/OCMock.framework/Versions/A/OCMock Reason: image not found IDEBundleInjection.c: Error loading bundle '/Users/alex/Library/Developer/Xcode/DerivedData/MyProj-bqwyxyspdiudktfnjcdgibdmpgsa/Build/Products/Debug/MyProjTests.octest'
After that, another application exit appears. While the application is running, the test move rotates on the last tab of the project navigator and does not stop until you leave the application. So the test seems to run all the time when your application is running.
Cleaning up the test host or package loader did not solve, it only created binding errors for the wrong architecture.
I am using the latest Xcode 4.6. Any help was greatly appreciated.
source share