希望在 watchOS 下运行应用程序在 Xcode beta 下出现错误:域:IDELaunchErrorDomain 代码:15 失败原因:构建和运行启动失败,因为系统似乎不知道要运行的应用程序。
问问题
1149 次
3 回答
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 回答