Encountering the above Xcode error when trying to build a Unit Test Bundle target usually means one of two things:
- The SenTestingKit is not installed.
- You are using an SDK with an older version of the Mac OS, where SenTestingKit is not included.
For the latter case, a possible solution is to set SDKROOT to "" (an empty string) for the testing target. Alternatively, one may add a link to the framework inside the /Developer/SDKs/<version>/System/Frameworks directory. However, trying that only triggered the next problem:
...MyApp: [NSBundle load] ... EXC_BAD_ACCESS (0x0001)KERN_INVALID_ADDRESS (0x0001) at 0xfffffffc /Developer/Tools/otest exited with error code 11 (it may have crashed)
It turns out that one should not try to run a unit test framework with settings other than ARCHS=$(native_arch), i.e. on a MacBook Pro, it should be "i386".
A follow-up problem is that one cannot test items with third-party libraries that do not support the same architecture (e.g. libeSellerateObjC.a, version 3.6.3, is only "ppc").