问题描述
当我尝试在真正的 Apple Watch 上构建和运行 WatchKit 扩展时,有时会收到以下错误消息:
When I try to build and run a WatchKit extension on my real Apple Watch, I sometimes get the following error message:
我已经尝试为 iPhone 构建父应用程序,然后又为我的 WatchKit 应用程序构建父应用程序,但我仍然收到错误消息.
I've tried to build the parent application for the iPhone and then again for my WatchKit app but I still get the error message.
有谁知道是什么导致了这个错误信息以及如何处理它?
Does anyone know what causes this error message and how to deal with it?
推荐答案
当在实际手表上安装 WatchKit App 需要很长时间并且 Xcode 由于长时间等待进程启动而超时时,似乎会发生这种情况安装时间.这可能需要很长时间,原因有两个:
This seems to happen when it takes a long time to install the WatchKit App on the actual watch and Xcode times out waiting for the process to start due to the long install time. It can take a long time for two reasons:
- Watch 有时需要一段时间才能注意到"应用需要更新,然后才能开始传输.
- 如果您的 Apple Watch 应用有大量图像或其他需要传输到手表的内容,则通过蓝牙进行实际传输可能需要很长时间.
如果你想避免这个错误,这里有一些技巧,改编自这篇博文,也可以告诉你如何加快你的应用安装:http://www.sneakycrab.com/blog/2015/5/28/speeding-up-slow-install-times-when-debugging-on-a-real-apple-watch
If you want to avoid this error, here are some tips, adapting from this blog post, which can also show you how to speed up your app installs: http://www.sneakycrab.com/blog/2015/5/28/speeding-up-slow-install-times-when-debugging-on-a-real-apple-watch
- 在 Xcode 中选择 iOS 基本方案以在您的手机上构建和安装.(不是 WatchKit 应用扩展)
- 在 Xcode 中点击停止.
- 让 iOS 注意到它需要开始安装 Watch 应用.有两种方法,a) 在手机上的 Apple Watch Companion App 中打开您的应用程序页面,或者 b) 直接在 Watch 上点击您的应用程序(当您看到微调器时,您可以点击表冠返回到应用程序图标屏幕,您应该会看到它开始加载)
- 在手表上安装好应用后,切换到 WatchKit 扩展方案并点击播放,它将等待附加调试
- 手动启动您的应用.
这篇关于如何避免错误“启动‘AppName’WatchKit 扩展时出错"?尝试在实际的 Apple Watch 上构建和运行 WatchKit 扩展时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!