SenTestingKit/SenTestingKit.h no such file or directory – XCode Unit Tests

Make sure, that your class is correctly bound to a Target.

This error may occur after you have chosen wrong target when you have been adding new Unit Test to the project. To fix problem, select your project node and remove Test Class from “Application” target and add it to “Application Test” target.

Select Application’s project node. On right panel choose “Build Phases” -> “Compile Sources”.

In case of “Application” target remove all Test Classes from there (into “Compile Sources”). In case “Application Test” target, add all Test Classes there (into “Compile Sources”).

You should be able to recompile the application without issues now.

Comments (1)

anonymousJanuary 26th, 2012 at 5:33 pm

Wow. That was a PITA. Thanks, I was about to pull my hair out trying to add some unit tests after the fact.