Xcode 8,无法配对手表模拟器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38892959/
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
Xcode 8, cannot pair watch simulator
提问by Jeff
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.
我正在运行 Xcode 8 beta 5。我的应用程序有一个手表扩展。我无法将 iPhone 模拟器与手表模拟器配对。我遵循了配对说明(Xcode、Window、Devices),但是那里没有列出手表模拟器,当我选择任何 iPhone 模拟器时也没有列出任何手表模拟器。我尝试过 Add Simulator 的变体,但我只得到了更多的 iPhone 模拟器——我从未在那里看到手表模拟器或配对。手表模拟器存在——我可以启动模拟器,但它没有配对。我试过删除Xcode并重新安装。与 beta 4 相同的问题。
How do I get the watch simulator to appear when I select an iPhone simulator in Device?
当我在设备中选择 iPhone 模拟器时,如何让手表模拟器出现?
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)
更新:需要明确的是,这些是 Apple 的“将 Apple Watch 模拟器与 iPhone 模拟器配对”的说明(https://developer.apple.com/library/ios/recipes/xcode_help-devices_organizer/PairingWatchestoiPhoneSimulators/PairingWatchestoiPhoneSimulators.html)
In the Devices window under Simulators, select an iPhone 5 and later simulator.
Under the Paired Watches table, click the Add button (+).
在模拟器下的设备窗口中,选择 iPhone 5 和更高版本的模拟器。
在配对手表表下,单击添加按钮 (+)。
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.
我确实在 Xcode 7 中看到了这一点,如下所示:
更新 2:在 Xcode 8 beta 6 中,配对手表表出现在设备窗口中,但配对仍然失败并显示“模拟器未配对”对话框。
回答by Jeff
I found two ways to deal with the multiple, identically-named simulators:
我找到了两种处理多个同名模拟器的方法:
- 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.
- Xcode Devices 窗口:为特定的 iPhone 设备创建一个新的手表模拟器并给它一个唯一的名称(例如,“test3”)。当您启动手表模拟器时,在手表的硬件、设备菜单中选择该模拟器。
- 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.
- Xcode:在 Xcode 的 Active Scheme 下拉菜单中选择并运行 iPhone 应用程序,然后也在 Active Scheme 中选择并运行 WatchKit 应用程序。这些操作中的每一个都将启动正确配对的模拟器,即使名称不明确。