【问题标题】:target specifies product type 'com.apple.product-type.bundle.ui-testing', but there's no such product type for the 'iphonesimulator' platform目标指定产品类型“com.apple.product-type.bundle.ui-testing”,但“iphonesimulator”平台没有这样的产品类型
【发布时间】:2015-07-16 22:49:07
【问题描述】:

当我运行我的 swift 项目时,我得到了这个错误。

target 指定产品类型 'com.apple.product-type.bundle.ui-testing',但没有这样的 “iphonesimulator”平台的产品类型

我在 SO 上发现了一些类似的问题,但 this 的答案并没有解决我的问题。我也googled了,里面没有这个产品类型的项目。

我使用的是 xcode 6.4 和 swift 1.2

【问题讨论】:

    标签: ios xcode swift xcode-ui-testing


    【解决方案1】:

    在使用 Xcode 7 Beta 添加用于 UI 测试的产品并在 Xcode 6.4 和 7 Beta 之间不断切换后,我遇到了这个问题。一个简单的clean让它消失了。

    【讨论】:

    • 谢谢。我尝试了其他选项,但这是唯一有效的选项。
    【解决方案2】:

    就我而言,清洁不起作用。

    打开AppName.xcodeproj/project.pbxproj,将all com.apple.product-type.*(有3个)替换为com.apple.product-type.application解决了我的问题。

    看来苹果在 Xcode 7 中更改了类型名称。

    【讨论】:

    • 如何访问AppName.xcodeproj/project.pbxproj ?我也遇到了同样的问题
    • @kebabTiger 使用 Finder 或终端,用你喜欢的任何文本编辑器打开。
    猜你喜欢
    • 1970-01-01
    • 2014-12-21
    • 1970-01-01
    • 2014-11-09
    • 2014-07-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多