无线调试是最近在Xcode 9、iOS 11和tvOS 11中添加的功能。苹果4K电视没有USB接口,因此需要无线调试。如何在Xcode中进行无线调试?


当前回答

使用USB端口开启Internet共享:

其他回答

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 Help -> Run and debug -> Network debugging获取更多信息。希望能有所帮助。

唯一能让它工作的方法就是我的Mac和iPhone连接到不同的网络上。我有一个主DSL调制解调器,称为network1,第二个network2为我们设置了一个接入点。他们有ssid network1和network2。如果电话在网络1上,mac在网络2上,它就可以工作,反之亦然。但是如果两者都在网络1上,或者两者都在网络2上,它就不能工作。

我试了所有的答案,但没有一个对我有效。我最终连接到不同的WiFi网络,然后我就可以无线调试了。

我不知道为什么它不能在旧的网络上工作

网络调试要求在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操作系统不适合胆小的人;-)