我有一个使用Kiwi测试框架的iOS项目(我从cocoapods安装的最新版本2.3.0 )。最初,当我运行测试时,我收到一个错误,它找不到XCTest.h。所以我遵循了这个答案的建议:https://stackoverflow.com/a/24651704/1082326,然后问题就消失了。
然而,一个不同的问题出现了,现在当我试图运行测试时,当选择的模拟器是"iPhone 5 (8.0)“时,我得到了以下错误:
IDEBundleInjection.c: Error 3587 loading bundle
'/Users/ifeins/Library/Developer/Xcode/DerivedData/teacup-
aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator/teacup-tests.octest':
The bundle “teacup-tests.octest” couldn’t be loaded because it is damaged or missing
necessary resources.
DevToolsBundleInjection environment:
XCInjectDiagnostics: (null)
XCInjectBundleInto: /Users/ifeins/Library/Developer/Xcode/DerivedData/teacup-
aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator/valet.app/valet
XCInjectBundle: /Users/ifeins/Library/Developer/Xcode/DerivedData/teacup-
aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator/teacup-tests.octest
TestBundleLocation: /Users/ifeins/Library/Developer/Xcode/DerivedData/teacup-
aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator/teacup-tests.octest
TMPDIR: /Users/ifeins/Library/Developer/CoreSimulator/Devices/BC59F7AC-9D3E-4FFC-9726-
97911AA597A6/data/Containers/Data/Application/E1D4A3F0-C06B-485D-BF87-9F5EA70D974A/tmp
DYLD_LIBRARY_PATH: /Users/ifeins/Library/Developer/Xcode/DerivedData/teacup-
aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator
DYLD_INSERT_LIBRARIES: /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFra
meworks/IDEBundleInjection.framework/IDEBundleInjection
DYLD_FRAMEWORK_PATH: /Users/ifeins/Library/Developer/Xcode/DerivedData/teacup-
aaenoytmfpqpgmaebqotyfrutlxy/Build/Products/Debug-iphonesimulator
DYLD_FALLBACK_LIBRARY_PATH: /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulat
or8.0.sdk/usr/lib
DYLD_FALLBACK_FRAMEWORK_PATH: /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/Developer/Library/Frameworks你知道问题出在哪里吗?
提前谢谢你,伊多
发布于 2014-11-25 23:17:28
我已经解决了这个问题,通过将代码签名设置为“不要代码签名”并清除项目(命令+ Option + Shift + K)。

发布于 2014-09-15 18:28:47
看看:https://stackoverflow.com/a/22024428/529243和https://stackoverflow.com/a/22056161/529243
我也犯了同样的错误,在完成了这些步骤之后,问题就消失了。
发布于 2014-10-16 17:24:03
使用XCTest转换向导:
Edit > Refactor > Convert to XCTesthttps://stackoverflow.com/questions/25488425
复制相似问题