Ios XCode获取";目标指定产品类型';com.apple.product type.bundle.unittest';,但是有';对于';iphoneos';平台“;

Ios XCode获取";目标指定产品类型';com.apple.product type.bundle.unittest';,但是有';对于';iphoneos';平台“;,ios,objective-c,xcode,unit-testing,xcode6,Ios,Objective C,Xcode,Unit Testing,Xcode6,在XCode中运行项目时,我的测试会出现以下错误: target specifies product type 'com.apple.product-type.bundle.unit-test', but there's no such product type for the 'iphoneos' platform 它发生在几次XCode更新之后。有人知道如何解决这个问题吗?看起来Xcode 6将ocunit测试捆绑包的产品标识符从com.apple.product type.bundle更

在XCode中运行项目时,我的测试会出现以下错误:

target specifies product type 'com.apple.product-type.bundle.unit-test', but there's no such product type for the 'iphoneos' platform

它发生在几次XCode更新之后。有人知道如何解决这个问题吗?

看起来Xcode 6将ocunit测试捆绑包的产品标识符从
com.apple.product type.bundle
更改为
com.apple.product type.bundle.ocunit test


编辑
$(ProjectName).xcodeproj/project.pbxproj
并将
com.apple.product type.bundle.ocunit test
的任何实例替换为
com.apple.product type.bundle
。现在,您需要在任何时候使用Xcode 6打开项目,然后在Xcode 5中打开它时执行此操作。

对我有效的方法是:

  • 删除launchScreen.storyboard(移动到垃圾箱)
  • 创建一个新的launchScreen.storyboard..From File->new File->iOS User Interface->launchScreen(我将其命名为相同的名称,并在底部选中所有目标)
  • 将部署目标从我创建项目时使用的9.1更改为8.3(这是为项目和目标完成的)
  • 到目前为止,我仍然得到同样的错误
  • 我刚刚在Xcode中从这个部分删除了ProjectNameUITest

  • 这需要赢得的不仅仅是选票。原始海报需要对此进行检查作为答案。@AlexPretzlav如何编辑项目名称和ocunit测试?我找不到这些实例,但我得到了完全相同的错误。@TheveshTheva在你的
    .xcodeproj
    文件中编辑名为
    project.pbxproj
    的文件(它可能看起来像一个文件,但实际上是一个文件夹,使用终端)确实需要更多的投票,不幸的是我只能给一个,但它值得100个伙计,我已经试了两个小时,还没有找到正确的解决办法。但你的回答帮助很大。我也有同样的错误,但我怎样才能改变它呢。我对所有这些东西都是新手,谁能给我一步一步的指导呢。谢谢