【发布时间】:2014-08-31 09:46:03
【问题描述】:
我有一个用 obj-c 和 swift 编写的框架。
现在我尝试运行一个相关的单元测试目标,但是我得到了这个错误:
2014-07-10 07:45:54.064 xctest[4908:303] The test bundle at /Users/steve/Temporary/Build/Products/Debug/SOGraphDB-Mac Tests.xctest could not be loaded because an unanticipated error occurred: Error Domain=NSCocoaErrorDomain Code=3587 "The bundle “SOGraphDB-Mac Tests” couldn’t be loaded because it is damaged or missing necessary resources." (dlopen_preflight(/Users/steve/Temporary/Build/Products/Debug/SOGraphDB-Mac Tests.xctest/Contents/MacOS/SOGraphDB-Mac Tests): Library not loaded: @rpath/libswiftAppKit.dylib
Referenced from: /Users/steve/Temporary/Build/Products/Debug/SOGraphDB.framework/Versions/A/SOGraphDB
Reason: image not found) UserInfo=0x10011c640 {NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Users/steve/Temporary/Build/Products/Debug/SOGraphDB-Mac Tests.xctest/Contents/MacOS/SOGraphDB-Mac Tests, NSDebugDescription=dlopen_preflight(/Users/steve/Temporary/Build/Products/Debug/SOGraphDB-Mac Tests.xctest/Contents/MacOS/SOGraphDB-Mac Tests): Library not loaded: @rpath/libswiftAppKit.dylib
Referenced from: /Users/steve/Temporary/Build/Products/Debug/SOGraphDB.framework/Versions/A/SOGraphDB
Reason: image not found, NSBundlePath=/Users/steve/Temporary/Build/Products/Debug/SOGraphDB-Mac Tests.xctest, NSLocalizedDescription=The bundle “SOGraphDB-Mac Tests” couldn’t be loaded because it is damaged or missing necessary resources.}
知道根本原因是什么吗? 该错误似乎与“未加载库:@rpath/libswiftAppKit.dylib”有关
(框架和测试包)编译时没有任何错误或警告(在 Beta2 中)
【问题讨论】:
-
尝试清理一切并重建
-
请检查是否包含 libswiftAppKit.dylib 以测试捆绑包成员身份
-
1.清洁和重建是我首先解决任何问题的标准方法。 2. no libswiftAppKit.dylib 不包含在测试包中,为什么呢?
-
顺便说一句。使用 beta4 我有同样的问题。
-
看来这个问题现在已经在 Xcode6-BETA5 中修复了。
标签: frameworks swift xctest