ios - 构建 Swift 框架测试失败

标签 ios xcode swift unit-testing frameworks

我正在尝试为自定义框架运行我的测试,但出现此错误:

"xctest[75653:2358339] The bundle “Tests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle."

我使用 carthage 向框架添加了一些依赖项。这可能是问题所在吗?

最佳答案

  • 从工作区内的依赖项中复制 xcodeprojs
  • 在包含来自测试目标的库的 buildPhase/link 二进制文件中,单击 + 添加依赖项并从工作区中选择它们(你必须在那里有你的 cocoa 框架 + 依赖项)
  • 命令 B
  • 命令 U

关于ios - 构建 Swift 框架测试失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33356071/

相关文章:

ios - iOS 10/Xcode 8 设备上的 NSLog 似乎被截断了?为什么?

iOS 8 Swift 1.2 和 Parse - 尝试在 View 不在窗口层次结构中的 ViewController 上呈现 UIAlertController

ios - 如何在 MKMapSnapshotter 上绘制 CLLocationCooperative2Ds(在 mapView 打印图像上绘制)

asp.net - 使用 ASP.NET 抓取任何设备名称

iOS 8 推送通知声音不适用于此特定案例

ios - Cordova 应用程序。代码 : The launch image set named "LaunchImage" did not have any applicable content

ios - 当 UIViewController 在启动期间设置为 UIWindow 的根时,不会调用 viewWillAppear 和后续生命周期事件

ios - iOS 8 中的 EXC_BREAKPOINT (SIGTRAP)

ios - 将 vCard 附加到 MFMessageComposeViewController

iphone - objective-c 中的可缩放按钮