Ios XCode获取";目标指定产品类型';com.apple.product type.bundle.unittest';,但是有';对于';iphoneos';平台“;
在XCode中运行项目时,我的测试会出现以下错误: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更
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中打开它时执行此操作。对我有效的方法是:
这需要赢得的不仅仅是选票。原始海报需要对此进行检查作为答案。@AlexPretzlav如何编辑项目名称和ocunit测试?我找不到这些实例,但我得到了完全相同的错误。@TheveshTheva在你的
.xcodeproj
文件中编辑名为project.pbxproj
的文件(它可能看起来像一个文件,但实际上是一个文件夹,使用终端)确实需要更多的投票,不幸的是我只能给一个,但它值得100个伙计,我已经试了两个小时,还没有找到正确的解决办法。但你的回答帮助很大。我也有同样的错误,但我怎样才能改变它呢。我对所有这些东西都是新手,谁能给我一步一步的指导呢。谢谢