Xcode 8, cannot pair watch simulator

拈花ヽ惹草 提交于 2019-12-09 16:50:39

问题


I'm running Xcode 8 beta 5. My app has a watch extension. I cannot pair the iPhone simulator with the watch simulator. I've followed the instructions for pairing (Xcode, Window, Devices) but there are no watch simulators listed there, nor are any listed when I select any of the iPhone simulators. I've tried variations of Add Simulator, but I only get more iPhone simulators -- I never see a watch simulator or a pairing there. The watch simulator exists -- I can launch the simulator, but it isn't paired. I've tried deleting Xcode and re-installing. Same issue with beta 4.

How do I get the watch simulator to appear when I select an iPhone simulator in Device?

UPDATE: To be clear, these are Apple's instructions for "Pairing Apple Watch Simulators to iPhone Simulators" (https://developer.apple.com/library/ios/recipes/xcode_help-devices_organizer/PairingWatchestoiPhoneSimulators/PairingWatchestoiPhoneSimulators.html)

  1. In the Devices window under Simulators, select an iPhone 5 and later simulator.

  2. Under the Paired Watches table, click the Add button (+).

I never see the "Paired Watches table" so there's no Add button.

I do see that in Xcode 7, like this: UPDATE 2: In Xcode 8 beta 6, the Paired Watches table appears in the Devices window, but the pairing still fails with a "Simulator Not Paired" dialog.


回答1:


I found two ways to deal with the multiple, identically-named simulators:

  1. Xcode Devices window: Create a new watch simulator for a particular iPhone device and give it a unique name (e.g., "test3"). When you launch the watch simulator, select that simulator in the watch's Hardware, Device menu.



  1. Xcode: Select and Run the iPhone app in Xcode's Active Scheme dropdown menu, then select and Run the WatchKit App in the Active Scheme, too. Each of those actions will launch the correctly-paired simulators, even if the names are ambiguous.

 



来源:https://stackoverflow.com/questions/38892959/xcode-8-cannot-pair-watch-simulator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!