【问题标题】:Issues running Apple Watch glance app in simulator在模拟器中运行 Apple Watch Glance 应用程序的问题
【发布时间】:2016-02-14 11:42:50
【问题描述】:

我正在尝试使用模拟器为我的 iOS 应用程序测试我的 Apple Watch Glance,但是我遇到了一些非常奇怪的行为。当我在simulator 中启动iOS 应用程序时,它可以正常工作并且应用程序功能齐全。但是,当我随后尝试启动 Apple Watch 的 Glance 应用程序时,它会出现,但 iOS 应用程序不再工作(如果我尝试从 simulator 启动它,它会立即崩溃)并且应用程序共享组未显示在手表上(但如果我从 Xcode 重新启动 iOS 应用程序 simulator 它会显示在那里)。

我检查了这两个应用程序,它们都配置为相同的共享组,确实如此。

我只是不明白为什么在simulator 中运行iOS 应用程序和Apple Watch 应用程序不能一起工作/正常运行?

【问题讨论】:

  • 如果您使用 watchos 2 appgroup 系统无法在设备上运行,您应该按照文档说明使用 wcsession
  • @WhiteTiger 是的,我将 watchos 2.0 与 appgroups 结合使用。您指的是哪个文档?我一直在环顾四周,但没有遇到任何描述我遇到的问题的东西(也许我忽略了它......)
  • developer.apple.com/library/prerelease/watchos/documentation/… 应用群仅限于watchos 2提出的新架构的watchapp watchextendion通信
  • 谢谢@WhiteTiger 我会考虑更新以改用WatchConnectivity 方法。

标签: ios xcode swift ios-simulator apple-watch


【解决方案1】:

感谢@WhiteTiger 这个答案:

如果您使用 watchos 2 appgroup 系统无法在设备上运行,您应该按照documentation 指示使用 wcsession。

或查看更新以改用WatchConnectivity 方法

【讨论】:

    猜你喜欢
    • 2015-01-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多