【问题标题】:How to restart only Apple Watch app when debugging?调试时如何仅重新启动Apple Watch应用程序?
【发布时间】:2015-05-02 13:01:57
【问题描述】:

我正在尝试使用 Apple Watch 模拟器进行调试。当我启动应用程序时,它运行良好—— awakeWithContext() 运行正常,但还没有数据。

在用户导航到 iOS 应用中的特定位置后,我需要测试 testawakeWithContext()(因为要获取更多数据)。

有没有办法在模拟器中不重启 iOS 应用而重启 Apple Watch 应用?我想到的唯一选择是在 Watch 应用程序上放置一个临时按钮,该按钮将调用 awakeWithContext()。谢谢!

【问题讨论】:

    标签: debugging xcode6 apple-watch


    【解决方案1】:

    您可以从终端终止手表应用的运行进程,然后重新启动它。

    kill -9 <pid of your watch app>
    xcrun simctl launch booted <identifier of your watch app>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-09
      相关资源
      最近更新 更多