无线调试是最近在Xcode 9、iOS 11和tvOS 11中添加的功能。苹果4K电视没有USB接口,因此需要无线调试。如何在Xcode中进行无线调试?
当前回答
将无线设备与Xcode配对(iOS, tvOS)
其他回答
网络调试要求在macOS 10.12.4上运行Xcode 9.0或更高版本 或更高版本,并且在设备上要求iOS 11.0或更高版本,或tvOS 11.0 或更高版本。
iPhone
iOS 11将不适用于32位设备,即iPhone 5、iPhone 5c及以下设备。第一代64位的iPhone是5s。
iPad
iPad mini 2将是支持iOS 11的最老的iPad。
iPod
iPod必须是iPod 6才能运行iOS。
如果你的设备不仅用于开发,还用于生产,请注意,beta操作系统不适合胆小的人;-)
我的问题是关于网络SSID广播。
我尝试了上面所有的解决方案,但仍然无法连接我的设备,我的设备根本没有“地球仪”图标。然后我发现由于某种原因,我的网络关闭了SSID广播(尽管我仍然可以通过手动输入SSID来连接网络)。一旦我打开SSID广播,我就可以通过“通过IP地址连接……”来连接我的设备。
设置网络调试设备
从help.apple.com
通过Wi-Fi或其他网络连接调试在iOS或tvOS设备上运行的应用程序。
设置iPhone、iPad或iPod touch的步骤
检查你的设备是否有密码,如果没有就添加一个。您的设备必须有密码才能启用远程调试 Mac和iPhone/iPad需要在同一个网络上才能使用无线调试。
接下来,在Xcode中
选择窗口>设备和模拟器,然后在出现的窗口中单击设备。 使用Lightning电缆将您的设备连接到Mac。 在左侧列中选择设备,在详细信息区域中选择“通过网络连接”。
Xcode与你的设备配对。如果Xcode可以通过网络连接到设备,则在设备的左列中会出现一个网络图标。
断开设备连接。
现在可以通过网络进行调试了。
有时候行不通。您可能需要重新启动设备或网络连接。
注意:网络调试需要在macOS 10.12.4及以上版本上运行Xcode 9.0及以上版本,在设备上运行iOS 11.0及以上版本,或tvOS 11.0及以上版本。
安装Apple TV的步骤:
Make sure your Mac and your Apple TV are on the same network. Choose Window > Devices and Simulators, then in the window that appears, click Devices. On your Apple TV, open the Settings app and choose Remotes and Devices > Remote App and Devices. The Apple TV searches for possible devices including the Mac. (If you have any firewall or Internet security, disable/turn it off to allow searching.) 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. Enter the verification code displayed on your AppleTV into the Device window pane for the device and click Connect.
Xcode设置Apple TV进行无线调试,并与设备配对。
将无线设备与Xcode配对(iOS, tvOS)
LOL, I was doing all the steps here - I ended up doing the unpairing/repairing steps from the "given by Surjeet" answer. It didn't work, and then I noticed that when I clicked the "connect via network" button, the same yellow box would pop up that pops up when you repair, saying "busy" - I got frustrated and just started hammering the "connect via network" button, clicking it quickly for probably like 15 - 20 clicks - it started spazzing out, but eventually landed on being able to connect to the network. Before that worked, I also shut my wifi off and turned it on again, as suggested by one of these answers, but clicking the "connect via network" button really fast did the trick...LOL
此外,在我按下按钮之前,我链接了设备支持文件夹,尽管我不确定它是否做了什么:
打开终端
cd /应用程序/ xcode /内容/开发/平台/ iPhoneOS.platform / DeviceSupport Ln -s 13.3 13.4 Ls -l 13.4 重启Xcode并在设备上重试运行
说在这里做- https://forums.developer.apple.com/thread/126940 -我在评论中编辑了文件夹版本,以调整到最新版本的iOS 13.4。
编辑 我相信我找到了我的问题所在,我不得不停止我的小飞贼网络过滤器。此外,在我能够通过敲击按钮连接后,当你在xcode的设备管理器中右键单击设备时,“通过IP地址连接”选项出现在下拉菜单中,在我第一次能够连接超级黑客风格之前,它就不在那里了。如果我连接,然后打开网络过滤器,它就会断开我的手机。
推荐文章
- Xcode构建失败“架构x86_64未定义的符号”
- 如何使用Xcode创建。ipa文件?
- 我可以在没有“构建和运行”的情况下启动iPhone模拟器吗?
- 动态改变UILabel的字体大小
- Xcode 4 -在新的Macintosh安装上的配置文件上“没有找到有效的签名标识”错误
- Xcode +删除所有断点
- 在iPhone上确定用户是否启用了推送通知
- 是否有可能禁用浮动头在UITableView与UITableViewStylePlain?
- Swift:理解// MARK
- 错误ITMS-9000:“冗余二进制文件上传。火车1.0版本已经有一个二进制版本上传。
- Swift -转换为绝对值
- 从父iOS访问容器视图控制器
- 自定义dealloc和ARC (Objective-C)
- 调整UITableView的大小以适应内容
- 在代码中为UIButton设置一个图像