在XCode7中调试watchos2应用程序的正确方法 [英] Proper way to debug watchos2 app in XCode7

查看:162
本文介绍了在XCode7中调试watchos2应用程序的正确方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在重写我的手表应用程序,在watchos2上工作,但在实际的手表(XCode7)上调试有问题。什么是正确的方法?



1)明显(但天真)的方法 - 将手机与配对手表连接,在XCode选择扩展方案在电话上运行+手表。点击播放,它应该工作,对吧?这似乎只是在新鲜配对之后才能正常工作,并且非常快速地断开(几次调试运行后)。查看下面的问题和行为



2)首先运行手机应用程序,然后添加运行的扩展名 - 这种方法对我来说更长时间,但最终也破裂了。



3)再次失去配对,而不是痛苦的经历,耗时且不实际。将会帮助一段时间。



主要问题:




  • 沟通 - 我看不到可达到或消息只是超时

  • 观看应用程序停止运行 - XCode正在说它正在运行,但不是 - 甚至不会附加。如果我手动运行它大部分时间都会附加,但是手机应用程序是无法访问的。

  • 手表应用程序甚至不会安装 - 我怀疑当XCode正在运行时实际上它不是因为当我从手表中删除应用程序,然后运行XCode时,会经历整个安装过程和运行,但该图标甚至不会出现在主屏幕上

  • 手机停止反应,当我使用选项2),并尝试运行其他的东西,而附加的应用程序

  • 手机似乎被阻止,选择其他应用程序(甚至回到我的应用程序)赢了没有工作,直到我杀死会话



设置:手机和手表配对正确,手机可以看到手表,看可以看电话其他应用程序正在运行。观看信任电脑,应用程序是在苹果手表上显示的。手机是5s 9.0.1。



我已经尝试过各种重新启动组合(手机|手表| xcode | mac),洗牌电缆,断开连接,重新连接等,但是也没有帮助。有没有人找到可用的方式如何从XCode调试watchos2应用程序?/ p>

没有人似乎对这个发布的XCode7抱怨,虽然我在beta版本中看到很多类似的问题。

解决方案

使用苹果手表充电电缆,将手表连接到开发运行Xcode的Mac。
它提供了更加成功和快速的调试。


I'm rewriting my watch app to work in watchos2 but have problems debugging on the actual watch (XCode7). What is the correct way how to do this?

1) Obvious (but naive) approach - connect your phone with paired watch, in XCode select Extension scheme to run on Phone + Watch. Click play and it should work, right? This seems to work only just after fresh pairing and breaks very quickly (after few debug runs). See issues and behaviour below

2) Run phone app first then add run of extension - this approach worked for me longer but eventually broke as well.

3) Unpair and pair again - more than painful experience, time consuming and not practical at all. Will help for a while though.

Main problems:

  • phone app not communicating - I've seen not reachable or messages just time out
  • watch app stops running - XCode is saying it's running but it's not - won't even attach. If I run it manually on watch most of the times it will attach but then the phone app is not reachable
  • watch app won't even install - I suspect when the XCode is saying it's running it in fact it doesn't because when I remove the app from watch and then run XCode goes through the whole install process and "running" but the icon doesn't even appear on the main screen
  • phone stops reacting when I use option 2) and try to run something else while app is attached
  • phone seems to be blocked, selecting other apps (even going back to my app) won't work until I kill the session

Setup: The phone and watch is paired correctly, phone can see watch, watch can see phone, other apps are working. Watch "trusts" the computer as well, app is "shown on apple watch". Phone is 5s 9.0.1.

I've tried various restart combinations (phone|watch|xcode|mac), shuffled cables, disconnect, reconnect, etc. but that didn't help either.

Did anybody find a usable way how to debug watchos2 app from XCode? Nobody else seems to be complaining about this with released XCode7 though I've seen lots of similar issues in beta builds.

解决方案

Use Apple watch recharging cable, connect your watch to developing Mac that runs Xcode. It provides much more successful and fast debugging.

这篇关于在XCode7中调试watchos2应用程序的正确方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆