Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode - SenTestingKit not found

I have an issue that popped up when I upgraded my version of xcode. I use unit tests, and I now when I try to import SenTestingKit (#import <SenTestingKit/SenTestingKit.h>), I get this error: SenTestingKit/SenTestingKit.h: No such file or directory.

I have looked at my build settings, and I have the following configuration options:

== Linking == Other Linker Flags: -framework Foundation -framework SenTestingKit -framework UIKit Prebinding: No  == Search Paths == Debug Configutation: "/iphonesimulator4.0/Developer/Library/Frameworks" "/Xcode4/Library/Frameworks" 

I've checked /Xcode4/Library/Frameworks, and the SenTestingKit.framework/ directory is there.

So what am I missing?

like image 691
Sam Valens Avatar asked Jul 28 '10 16:07

Sam Valens


2 Answers

I had this same issue when creating a new test case in XCode. However, this was due to stupidity of me selecting the wrong target when creating the test case.

Using "File New...", the test case was being included and compiled with the target application settings instead of test case's target. Checking the Build Phases tab and looking in the "Compile Sources" disclosure revealed my particular issue.

like image 108
davidwu Avatar answered Sep 21 '22 04:09

davidwu


I had this issue after upgrading to xcode 4.3. Nothing seemed to work until I came across this post. I already had the same search paths, but changing the order solved the issue.

So from the article, you need the two following values in your Framework Search Paths, in this order.

$(SDKROOT)/Developer/Library/Frameworks $(DEVELOPER_LIBRARY_DIR)/Frameworks 
like image 40
DougW Avatar answered Sep 22 '22 04:09

DougW