执行UI自动化测试未能载入软件包“UITests”,因为它已损坏或缺少必要的资源。

1,721 阅读1分钟

这个错误是因为你的 cocoapods 只支持你工程的 Target 而没有支持 TargetUITests,将你使用的 pods 复制一份添加到TargetUITests下就可以了

如下:

target 'YouTarget' do
  use_frameworks!
  pod 'CleanJSON'
end

target 'YouTargetUITests' do
  use_frameworks!
  pod 'CleanJSON'
end