你如何在 iOS 11、Apple TV 4K 等的 Xcode 9 中进行无线调试? [英] How do you perform wireless debugging in Xcode 9 with iOS 11, Apple TV 4K, etc?

查看:26
本文介绍了你如何在 iOS 11、Apple TV 4K 等的 Xcode 9 中进行无线调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近在 Xcode 9、iOS 11 和 tvOS 11 中添加了无线调试功能.Apple TV 4K 没有 USB 端口,因此需要无线调试.你如何在 Xcode 中进行这种无线调试?

解决方案

Xcode 与您的设备配对.如果 Xcode 可以使用网络与设备连接,则左栏中的设备旁边会出现一个网络图标.

  • 断开您的设备.

  • 注意:设备需要密码才能启用远程调试.

    现在您可以通过网络进行调试了.


    设置 Apple TV 的步骤:

    1. 确保您的 Mac 和 Apple TV 在同一网络上.

    2. 选择窗口>设备和模拟器,然后在出现的窗口中,点击设备.

    3. 在 Apple TV 上,打开设置"应用并选择遥控器和设备">远程应用和设备.

    4. Apple TV 搜索可能的设备,包括 Mac.(如果您有任何防火墙或 Internet 安全功能,请禁用/关闭以允许搜索.)

    5. 在 Mac 上,在设备"面板中选择 Apple TV.显示 Apple TV 的窗格并显示连接请求的当前状态.

    6. 将 AppleTV 上显示的验证码输入设备的设备"窗口窗格,然后单击连接".

    Xcode 设置 Apple TV 以进行无线调试并与设备配对.

    -------

    有时配对不适用于无线调试,因此只需重新启动您的设备和互联网连接.此外,如果启用了防火墙,您需要关闭防火墙以配对设备.

    Wireless debugging was recently added as a feature in Xcode 9, iOS 11, and tvOS 11. Apple TV 4K doesn't have a USB port, so it requires wireless debugging. How do you perform this wireless debugging in Xcode?

    解决方案

    Set up a device for network debugging

    from help.apple.com

    NOTE: Mac system and iPhone/iPad should share same network to use wireless debugging.

    Sometimes it doesn't work, so need to restart device/network connection

    Debug your app running on an iOS or tvOS device over a WiFi or other network connection.

    Note: Network debugging requires Xcode 9.0 or later running on macOS 10.12.4 or later, and on the device, requires iOS 11.0 or later, or tvOS 11.0 or later.

    Steps to set up iPhone, iPad, or iPod touch

    1. Choose Window > Devices and Simulators, then in the window that appears, click Devices.

    2. Connect your device to your Mac with a Lightning cable.

    3. Check if passcode enables in your device settings. Enable if not already enabled.

    4. In the left column, select the device, and in the detail area, select Connect via network.

      Xcode pairs with your device. If Xcode can connect with the device using a network, a network icon appears next to the device in the left column.

    5. Disconnect your device.

    Note: Device require a passcode to enable remote debugging.

    Now you are ready for debugging over the network.


    Steps to set up Apple TV:

    1. Make sure your Mac and your Apple TV are on the same network.

    2. Choose Window > Devices and Simulators, then in the window that appears, click Devices.

    3. On your Apple TV, open the Settings app and choose Remotes and Devices > Remote App and Devices.

    4. The Apple TV searches for possible devices including the Mac. (If you have any Firewall or Internet security, disable/turn off to allow searching.)

    5. On your Mac, select the Apple TV in the Devices pane. The pane for the Apple TV is displayed and shows the current status of the connection request.

    6. Enter the verification code displayed on your AppleTV into the Device window pane for the device and click Connect.

    Xcode sets up the Apple TV for wireless debugging and pairs with the device.

    Edit: -------

    Sometime pairing doesn't work for wireless debugging, So just restart your device and internet connection. Also if firewall is enabled, you need to turn off Firewall for pairing device.

    这篇关于你如何在 iOS 11、Apple TV 4K 等的 Xcode 9 中进行无线调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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