target specifies product type 'com.apple.product-type.bundle.ui-testing//

target specifies product type 'com.apple.product-type.bundle.ui-testing

com.apple.product-type.bundle.ui-testingcom.apple.product-type.bundle.ui-testing


这个bug 一般是因为用新版本创建的Xcode工程 ,用低版本Xcode打开时 有时会出现。比如,xcode7已经支持SDK9.0以上了,而xcode6只支持SDK8.4以下。所以,在高版本的 创建的工程如果在低版本打开就会报错。

那么如何解决呢?

  • 第一步
  • 第二步
  • 第三步

第一步

 看图操作

然后 command +b 编译一次

target specifies product type 'com.apple.product-type.bundle.ui-testing//_第1张图片
这里写图片描述


第二步

完成第一步后,
在工程的所在的目录下,右键 点击 显示包内容
显示后 再选择 打开 project.pbxproj 的文件
然后就是 command +F 搜 com.apple.product-type.bundle.ui-testing
并将其替换为 com.apple.product-type.bundle
之后从新打开工程 编译一次command +b

看图操作

target specifies product type 'com.apple.product-type.bundle.ui-testing//_第2张图片
这里写图片描述


第三步

在xcode打开之后,可以看到工程有两个(ProjectName)Tests 文件夹
直接 delete其中一个
选择 move to trash 完全的删除就可以

你可能感兴趣的:(target specifies product type 'com.apple.product-type.bundle.ui-testing//)