xcode 为 iPhone 准备调试器支持

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/47269214/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 10:25:45  来源:igfitidea点击:

Preparing debugger support for iPhone

iosiphonexcodevirtual-machine

提问by Tiago_nes

I cant install he app on iphone i'm stuck on this message.

我无法在 iphone 上安装他的应用程序,我被这条消息困住了。

"Preparing debugger support for iPhone"

“为 iPhone 准备调试器支持”

Tried all answers hereand still nothing.

在这里尝试了所有答案,但仍然没有。

It is followed by itunes could not connect to iphone or whatever...

其次是itunes无法连接到iphone或其他什么...

I'm using a virtual mac machine.

我正在使用虚拟机。

采纳答案by Tiago_nes

After hours of research and useless downvotes i got the tiny trouble. My virtualbox was configured to connect the devices over USB 1.0

经过数小时的研究和无用的反对票,我遇到了小麻烦。我的虚拟机配置为通过 USB 1.0 连接设备

As soon as i installed extensions pack and switched to USB 2.0 the app started deploying.

一旦我安装了扩展包并切换到 USB 2.0,应用程序就开始部署。

回答by SergeyII

For me, the following worked: On iphone open Settings -> Developer -> Clear Trusted Computers. Then disconnect and reconnect the iphone. Confirm that you trust this computer. After that, the error disappeared.

对我来说,以下操作有效:在 iphone 上打开设置 -> 开发人员 -> 清除受信任的计算机。然后断开并重新连接iphone。确认您信任这台计算机。之后,错误消失了。

回答by Cons Bulaquena

Using macOS High Sierra. I had my app working by going to my iPhone to configure.

使用 macOS High Sierra。我通过转到我的 iPhone 来配置我的应用程序。

Settings > General > Device Management > Click Trust "(Developer Apps)"

设置 > 通用 > 设备管理 > 点击信任“(开发者应用)”

回答by kakyo

My setup

我的设置

  • macOS 10.14.6
  • iOS 13.2.3
  • Xcode 11.2
  • macOS 10.14.6
  • iOS 13.2.3
  • Xcode 11.2

Tried all the "speed-it-up" tips up till 2019-11-24 without luck. The wait seemed inevitable but incredibly long in my case:

在 2019 年 11 月 24 日之前尝试了所有“加速”技巧,但没有成功。等待似乎不可避免,但就我而言,等待时间长得难以置信:

with a freshly upgraded iOS version.

带有全新升级的 iOS 版本。

I then found this comment on redditwhich makes the most sense:

然后我在reddit上发现了这条评论,这是最有意义的:

This is required when you connect a device with an iOS version that the respective computer's Xcode didn't see before. It saves them in /Users/username/Library/Developer/Xcode/iOS DeviceSupport and it does take a while. Don't restart Xcode as it will not help you, just wait for it to finish.

It takes quite some time because these debugger support files occupy a lot of space (29 GB for me), though you can safely delete any version from there, and if you connect a device with that version again, it will re-save it from scratch.

当您将设备与相应计算机的 Xcode 之前未见过的 iOS 版本连接时,这是必需的。它将它们保存在 /Users/username/Library/Developer/Xcode/iOS DeviceSupport 中,它确实需要一段时间。不要重新启动 Xcode,因为它对您没有帮助,只需等待它完成即可。

这需要相当长的时间,因为这些调试器支持文件占用了大量空间(对我来说是 29 GB),但您可以安全地从那里删除任何版本,如果您再次连接具有该版本的设备,它会从划痕。

So if you just upgraded your iOS, then the "from scratch" part could take longer than usual, also depending on your network condition. In my case, it is definitely much much longer than the "10-15min" other people claimed. I measure it by hours.

因此,如果您刚刚升级了 iOS,那么“从头开始”部分可能需要比平时更长的时间,这也取决于您的网络状况。就我而言,它肯定比其他人声称的“10-15 分钟”长得多。我是按小时来衡量的。

A lot of tricks seem to have worked but they neglect the fact that time goes on as you try things while Xcode keeps working on the setup in the background, and quite possibly resumes its job whenever you do a restart/reboot cycle.

很多技巧似乎都奏效了,但它们忽略了这样一个事实:当您尝试时,Xcode 会继续在后台进行设置,并且很可能在您执行重新启动/重新启动循环时恢复其工作。

This led me to noticing that my Xcode version is just one step behind the iOS point release. After upgrading my Xcode, it worked.

这让我注意到我的 Xcode 版本仅比 iOS 单点版本落后一步。升级我的 Xcode 后,它起作用了。

But it took longer because I removed the iOS DeviceSupport folder by following a tip!

但是花费了更长的时间,因为我按照提示删除了 iOS DeviceSupport 文件夹!

So here are my suggestions:

所以这里是我的建议:

  • Check your Xcode version down to the minor version to make sure it should actually support the iOS version.
  • Check your Mac's free disk space to make room for newly generated device support content under ~/Library/Developer/Xcode/iOS DeviceSupportas this tipsuggested.
  • Check if you have connected your device to a fast-enough USB port, as the accepted answer of this question suggests.
  • Wait till Xcode finishes "preparing for debugging".
  • If it doesn't finish in a few seconds or minutes, keep waiting.
  • DO NOT remove any folder as some tipsmay suggest. Removal would simply make you wait longer!
  • 检查您的 Xcode 版本到次要版本,以确保它实际上应该支持 iOS 版本。
  • ~/Library/Developer/Xcode/iOS DeviceSupport按照此提示的建议,检查 Mac 的可用磁盘空间,以便为新生成的设备支持内容腾出空间。
  • 检查您是否已将设备连接到足够快的 USB 端口,正如该问题的公认答案所暗示的那样。
  • 等到 Xcode 完成“准备调试”。
  • 如果它没有在几秒钟或几分钟内完成,请继续等待。
  • 不要像某些提示建议的那样删除任何文件夹。移除只会让您等待更长时间!