iOS:Watch Kit 配对设备不可用于开发
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33380684/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
iOS: Watch Kit paired device unavailable for development
提问by akiraspeirs
I can't run my Apple Watch application in XCode. My phone+watch is listed as a "Unavailable Device" and says "paired device unavailable for development". When I try to launch the app it says the same thing.
我无法在 XCode 中运行我的 Apple Watch 应用程序。我的手机+手表被列为“不可用设备”并显示“配对设备不可用于开发”。当我尝试启动该应用程序时,它说同样的话。
How can I resolve this?
我该如何解决这个问题?
I'm using XCode 7.1, iOS 9.0, WatchOS 2.0.1.
我使用的是 XCode 7.1、iOS 9.0、WatchOS 2.0.1。
回答by possen
This is what worked for me, and it is a lot easier and faster than un-pairing so I would try this first. From the Clock Face Swipe up, and click on the Ping iPhone button. After it makes a sound, go back in Xcode it should change no longer be unpaired or unavailable for development.
这对我有用,它比取消配对更容易和更快,所以我会先尝试这个。从钟面向上滑动,然后单击 Ping iPhone 按钮。发出声音后,返回 Xcode,它应该不再是未配对或不可用于开发。
回答by Will
I had the same issue on iOS 9.1 + WatchOS 2.01 that XCode 7.1 kept saying "paired device not available for development". Here is what I did to solve it finally, not quite sure which step is critical -
我在 iOS 9.1 + WatchOS 2.01 上遇到了同样的问题,XCode 7.1 一直说“配对设备不可用于开发”。这是我最终为解决它所做的工作,不太确定哪一步至关重要-
- Unpair my watch
- Reboot both iPhone and apple watch
- Pair them again, and setup my watch as a new one
- Plug (unplug first) iPhone to Mac
- On apple watch, say Trust the computer when it asks
- Unplug and plug again
- 取消配对我的手表
- 重启 iPhone 和 Apple Watch
- 再次配对,并将我的手表设置为新手表
- 将(先拔出)iPhone 插入 Mac
- 在 Apple Watch 上,当它询问时说 Trust the computer
- 拔掉再插上
Bang! My apple watch is well recognized for development. Hope it helps.
砰! 我的苹果手表在开发方面得到了广泛的认可。希望能帮助到你。
回答by Megalone
I can confirm having this too by using the following configuration: OS X, Xcode7.2 beta, iPhone5s with iOS9.2 and WatchOS 2.1
我也可以通过使用以下配置来确认有这个:OS X、Xcode7.2 beta、带有 iOS9.2 和 WatchOS 2.1 的 iPhone5s
I unplugged the iphone again, closed and restarted Xcode and plugged in the iPhone again - than it worked fine!
我再次拔掉 iphone,关闭并重新启动 Xcode,然后再次插入 iPhone - 比它工作正常!
回答by Yizhar
Rebooting the Apple Watch worked for me, after that it displays the 'trust this computer' message which is required to debug the watch with XCODE.
重新启动 Apple Watch 对我有用,之后它会显示使用 XCODE 调试手表所需的“信任这台计算机”消息。
回答by Yizhar
Deleting the 'famous' XCODE Derived Data folder did it for me.
删除“著名的”XCODE Derived Data 文件夹为我做了这件事。
Steps for newbies:
新手操作步骤:
- Close XCODE.
- Delete the Derived Data folder, to find it's location go in XCODE to upper menu: XCODE -> Preferences -> Locations: Here click on the Derived Data arrow.
- Reopen XCODE.
- 关闭 XCODE。
- 删除派生数据文件夹,在 XCODE 中找到它的位置到上层菜单:XCODE -> 首选项 -> 位置:在这里单击派生数据箭头。
- 重新打开 XCODE。
Tested on XCODE8.0.
在 XCODE8.0 上测试。
回答by Alison Borba
I just restart the Xcode to solve the problem.
我只是重新启动Xcode来解决问题。
回答by khheng
Go to Window--> Device and Simulator , Unpair device and Disconnect from cable and connect back works for me.
转到 Window--> Device and Simulator ,Unpair device and Disconnect from cable and connect back 适用于我。
回答by Rodrigo Recio
It just happened to me and I fixed it by
它只是发生在我身上,我修复了它
- quitting Xcode
- putting the Watch on the charger
- open Xcode
- select the Watch App Target
- select the iPhone paired to watch as the device to run
- Wait until '(paired device unavailable for development)' or '(no paired Apple Watch)' disappears from device description at the Xcode toolbar
- Run!
- 退出 Xcode
- 将手表放在充电器上
- 打开Xcode
- 选择 Watch App Target
- 选择配对的 iPhone 作为要运行的设备
- 等到“(配对的设备不可用于开发)”或“(未配对的 Apple Watch)”从 Xcode 工具栏的设备描述中消失
- 跑!
回答by Brad K.
Deleting everything in ~/Library/Developer/Xcode/watchOS DeviceSupport/
worked for me.
删除所有~/Library/Developer/Xcode/watchOS DeviceSupport/
对我有用的东西。
回答by mmremann
I followed the steps above repeatedly and still got the same issue. What I found fixed the issue was not signing into iCloud and only using Messages instead. Once I did that it worked beautifully. Thank you.
我反复按照上述步骤操作,但仍然遇到相同的问题。我发现解决问题的不是登录 iCloud,而是仅使用消息。一旦我这样做了,它就工作得很好。谢谢你。