SenTestingKit.framework的报错!

本文转载至http://www.cocoachina.com/ask/questions/show/106912

ld: building for iOS Simulator, but linking against dylib built for MacOSX file
'/Applications/Xcode5-DP5.app/Contents/Developer/Library/Frameworks/XCTest.framework/XCTest' 
for architecture i386

 

可以试试这样:在Framework search Paths 里添加“$(inherited)和$(SDKROOT)/Developer/Library/Frameworks”, 还有“$(DEVELOPER_LIBRARY_DIR)/Frameworks” ,我参考楼上的回答和http://stackoverflow.com/questions/18266649/xctest-build-errors-for-test-target-xcode-5 这个链接里的回答,发现按照他们的解决方案添加第三条路径后仍有报错,于是在左侧列表中右键Frameworks里面的SenTestingKit.framework,选择“Show in Finder ”,查看该框架的路径,最终,我把第三条路径改成"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks",就成功了。:D

原文地址:https://www.cnblogs.com/Camier-myNiuer/p/4058426.html