加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

框架 – MacOS Swift框架测试失败

发布时间:2020-12-14 05:33:02 所属栏目:百科 来源:网络整理
导读:我有一个用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 b
我有一个用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从Xcode应用程序目录(我正在使用beta 3)复制到我可以引用的目录(不是应用程序包的一部分),然后将库添加到“Link binary with libraries”设置中测试包.我的测试然后开始工作.

仅供参考,对于dylib的路径是在“/Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftAppKit.dylib”

可能不是一个好的最终解决方案,但它适用于临时.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读