本文轉載至http://www.cocoachina.com/ask/questions/show/106912xcode
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",就成功了。:Dapp