Debug WatchKit on real Apple Watch - Nothing happens

前端 未结 4 1243
盖世英雄少女心
盖世英雄少女心 2020-12-23 22:22

I am struggling with debugging my WatchKit Extension/App on a real Apple Watch. Debugging both the iPhone App and the WatchKit Extension using the simulator the simulator is

4条回答
  •  清歌不尽
    2020-12-23 23:06

    This question has different answers. All are good.

    The reason is: in my experience there are at least two different problems that prevent debugging on a real watch. Both require a different strategy.

    This answer tries to help you to decide when to use which strategy.

    1. XCode installs, tells you it is running for a short time and then stops showing "running...".
      • start with the answer of BalestraPatrick:
      • restart your devices.
      • Do not forget to restart your iPhone. This did the trick the first time I had this problem.
    2. XCode installs, tells you it is running for a longer period of time: "running on Apple Watch of .
      • start with the answer of Jay Hickey or Andrei Herford
      • starting the watch app manually probably does the trick.

    I also had times when XCode was able to start my watch app without any help from me.

    Bonus:

    Starting with XCode 7.1 it seems XCode doesn't always compile all necessary Swift files (more often than before). This is not watch specific, it also applies to iOS apps. The symptoms can look similar to those of this question. -> clean your project and then restart XCode.

提交回复
热议问题