11

希望在 watchOS 下运行应用程序在 Xcode beta 下出现错误:域:IDELaunchErrorDomain 代码:15 失败原因:构建和运行启动失败,因为系统似乎不知道要运行的应用程序。

4

3 回答 3

7

我的解决方案是添加到监视应用程序方案 iOS 目标,如屏幕截图所示: 在此处输入图像描述

但是,我向 Apple 报告了这种行为。

于 2019-09-24T14:55:02.553 回答
1

修改捆绑标识符后发生在我身上。遵循这些步骤对我有用:

  • 删除所有方案
  • 选择WatchKit App目标并在General > Embedded Content删除WatchKit 扩展
  • 选择WatchKit Extension目标并Info > NSExtension > NSExtensionAttributes > WKAppBundleIdentifier确保它与WatchKit App的标识符相同
  • 清洁构建(以防万一)
  • 再次选择WatchKit App目标并在下方General > Embedded Content添加WatchKit Extension
  • 为WatchKit 应用添加新方案
  • 编辑新方案并Build添加目标:(Evgeny Zrorin的学分)
    • 如果您的WatchKit App是 iOS App 的伴侣,则 iOS App目标
    • 如果您的WatchKit App是独立 App ,则 Xcode 生成的iOS目标

你必须有 2 个目标Scheme > Build,运行你的应用程序,祝你好运

于 2019-10-23T11:05:29.190 回答
0

With your WatchKit app selected under your targets, go to 'Build Phases', expand the 'Dependencies' and the 'Embed App Extensions' sections and make sure that the correct Watchkit App Extension is present there. If you duplicated your target, it is possible that an old unrelated WatchKit extension sitting over there is creating the problem.

于 2020-07-22T06:28:03.657 回答