ios Xcode Organizer:无法使用 iPhone(dyld_shared_cache_extract_dylibs failed)

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

Xcode Organizer: can not use iPhone (dyld_shared_cache_extract_dylibs failed)

iphonexcodemacosios

提问by mbuchetics

When plugging my iPhone in and starting the Xcode organizer, a yellow circle next to the device show me that "This device is busy or otherwise unusable by Xcode." The Organizer is then processing two files (the second one takes quite a while to finish) and afterwards I get the error message as shown in the screenshot.

插入我的 iPhone 并启动 Xcode 管理器时,设备旁边的黄色圆圈显示“此设备正忙或 Xcode 无法使用”。然后,管理器正在处理两个文件(第二个文件需要很长时间才能完成),然后我收到错误消息,如屏幕截图所示。

I tried to google for that error message ("dyld_shared_cache_extract_dylibs failed") but could not find anything useful. I tried a couple things: repair permissions of my harddrive and run "sudo update_dyld_shared_cache -force". Still getting the error message.

我试图用谷歌搜索该错误消息(“dyld_shared_cache_extract_dylibs 失败”),但找不到任何有用的信息。我尝试了几件事:修复硬盘驱动器的权限并运行“sudo update_dyld_shared_cache -force”。仍然收到错误消息。

I am running iOS 4.2.1 and Xcode 3.2.5. I have not updated Xcode after updating from 4.2 to 4.2.1 (I think). alt text

我正在运行 iOS 4.2.1 和 Xcode 3.2.5。从 4.2 更新到 4.2.1(我认为)后,我还没有更新 Xcode。 替代文字

The Xcode console is empty but the regular OS X console shows this:

Xcode 控制台是空的,但常规的 OS X 控制台显示:

1/22/11 10:56:19 PM     Xcode[4187]     Started symbol copying process
1/22/11 10:56:19 PM     Xcode[4187]     Skipped copying file 1 of 2 ("processed" sentinal found)
1/22/11 10:56:19 PM     Xcode[4187]     Skipped processing file 1 of 2 ("processed" sentinal found)
1/22/11 10:56:19 PM     Xcode[4187]     Skipped copying file 2 of 2 ("copied" sentinal found)
1/22/11 10:56:19 PM     Xcode[4187]     Started processing file 2 of 2
1/22/11 10:56:20 PM     [0x0-0x4d04d].com.apple.Xcode[4187]     arch already exists in fat dylib
1/22/11 10:56:20 PM     [0x0-0x4d04d].com.apple.Xcode[4187]     arch already exists in fat dylib
1/22/11 10:56:20 PM     [0x0-0x4d04d].com.apple.Xcode[4187]     arch already exists in fat dylib
1/22/11 10:56:21 PM     [0x0-0x4d04d].com.apple.Xcode[4187]     arch already exists in fat dylib
1/22/11 10:56:21 PM     [0x0-0x4d04d].com.apple.Xcode[4187]     arch already exists in fat dylib
1/22/11 10:56:22 PM     [0x0-0x4d04d].com.apple.Xcode[4187]     arch already exists in fat dylib
1/22/11 10:56:22 PM     [0x0-0x4d04d].com.apple.Xcode[4187]     arch already exists in fat dylib
1/22/11 10:56:22 PM     [0x0-0x4d04d].com.apple.Xcode[4187]     arch already exists in fat dylib
1/22/11 10:56:23 PM     [0x0-0x4d04d].com.apple.Xcode[4187]     arch already exists in fat dylib
1/22/11 10:56:23 PM     [0x0-0x4d04d].com.apple.Xcode[4187]     arch already exists in fat dylib
1/22/11 10:56:23 PM     [0x0-0x4d04d].com.apple.Xcode[4187]     arch already exists in fat dylib

This error message is then repeated constantly.

然后不断重复此错误消息。

采纳答案by mbuchetics

With the help of somebody at the Apple Developer Forums I was able to fix the problem by removing the "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)" folder. Xcode then re-added the symbols automatically and the error disappeared. For more information see this thread.

在 Apple Developer Forums 上有人的帮助下,我能够通过删除“/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)”文件夹来解决问题。Xcode 然后自动重新添加符号,错误消失了。有关更多信息,请参阅此线程

回答by Vlad Papko

Target path to directory has been changed since Xcode 3.

自 Xcode 3 以来,目录的目标路径已更改。

If you have same issue in Xcode 8 then follow next steps:

如果您在 Xcode 8 中遇到同样的问题,请按照以下步骤操作:

  1. Delete a directory in ~/Library/Developer/Xcode/iOS DeviceSupport/
    that matches the version of the iOS on your device.
  2. Restart Xcode.
  1. 删除~/Library/Developer/Xcode/iOS DeviceSupport/
    与您设备上的 iOS 版本匹配的目录。
  2. 重新启动Xcode。

Source: Apple Developer Forum

来源:苹果开发者论坛

回答by Ota Gomes

After all this time I wanna contribute with one more possible solution for this problem...

毕竟,我想为这个问题提供另一种可能的解决方案......

  1. Open Devices and Simulators
  2. Right click on your device and select Unpair Device
  3. Wait until your device ask for trust - this is important.. I noted that if I don′t wait this step the error persists
  4. Click on the plus button down... (+).
  5. When the next window open, if your iPhone still not appears wait a lit bit.. will appear
  6. When your device appear, select it.
  1. 开放设备和模拟器
  2. 右键单击您的设备并选择 Unpair Device
  3. 等到你的设备请求信任 - 这很重要..我注意到如果我不等待这一步错误仍然存​​在
  4. 单击加号按钮向下...(+)。
  5. 当下一个窗口打开时,如果你的 iPhone 仍然没有出现,请稍等一下.. 会出现
  6. 当您的设备出现时,选择它。

One more thing: I changed the version inside /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport from 10.3 to 10.3.3 - that is "exactly" version on my device, so, observe this too.

另一件事:我将 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport 中的版本从 10.3 更改为 10.3.3 - 这是我设备上的“完全”版本,因此,请注意这一点。

Believe in me guys... I bought 2 cables, investigate all links in google, bing, yahoo, books, forums... everything and nothing solves... until this.

相信我……我买了 2 条电缆,调查了 google、bing、yahoo、书籍、论坛中的所有链接……一切都没有解决……直到这个。

回答by manman

For me the approach that worked was the one mentioned herewhich is:

对我来说,有效的方法是这里提到的方法:

  1. Open Finder and go to ~/Library/Developer/Xcode/iOS DeviceSupport/
  2. Remove the folder that matches your device and reconnect your phone
  1. 打开 Finder 并转到 ~/Library/Developer/Xcode/iOS DeviceSupport/
  2. 删除与您的设备匹配的文件夹并重新连接您的手机

回答by Naren

For Xcode 10.1, iOS 13.3 Below helped me.

对于 Xcode 10.1,iOS 13.3 下面帮助了我。

Copied from https://forums.developer.apple.com/thread/108917

复制自https://forums.developer.apple.com/thread/108917

  1. go to ~/Library/Developer/Xcode/iOS DeviceSupport/13.2/Symbols/System/Library/Caches/com.apple.dyld

  2. create empty file if it is not there - .processed_dyld_shared_cache_arm64e

  3. restart xcode and enjoy!

  1. 转到 ~/Library/Developer/Xcode/iOS DeviceSupport/13.2/Symbols/System/Library/Caches/com.apple.dyld

  2. 如果不存在,则创建空文件 - .processed_dyld_shared_cache_arm64e

  3. 重新启动xcode并享受!

回答by Tom

For what it's worth: I encountered this problem when I was out of disk space. It seems that XCode was the first application to 'notice' by throwing this error. After freeing up some disk space everything worked fine again.

值得一提的是:我在磁盘空间不足时遇到了这个问题。XCode 似乎是第一个通过抛出此错误来“注意”的应用程序。释放一些磁盘空间后,一切正常。

回答by Max N

This happened to me when disk space was very low on the mac

当 mac 上的磁盘空间非常低时,这发生在我身上

回答by Ashkan Ghodrat

for xCode 10.1 on High Sierra, you need to create an empty file named :

对于 High Sierra 上的 xCode 10.1,您需要创建一个名为 的空文件:

.processed_dyld_shared_cache_arm64e

and paste it to:

并将其粘贴到:

 /Users/{you}/Library/Developer/Xcode/iOS DeviceSupport/{your device version} arm64e/Symbols/System/Library/Caches/com.apple.dyld

make sure that the folder is empty. for me it took couple of time trying and waiting and removing device to get it to work.

确保该文件夹为空。对我来说,花了一些时间尝试、等待和移除设备才能让它工作。

回答by Nishant Sharma

I had solved my problem through this:-

我已经通过这个解决了我的问题:-

https://www.youtube.com/watch?v=m3jST08imY0

https://www.youtube.com/watch?v=m3jST08imY0

to sum up , you could:

总结一下,你可以:

  1. Go to window-devices and simulators
  2. Select the unrunable device and right click, then choose unpair
  3. now this is the crucial part, your device will ask for trust automatically, dont click trust
  4. Focus back to the device panel, left click the + and add the device, click next, it will ask you to tap the "trust" IN THE PANEL
  5. Now you can tap the "trust" in your phone, the panel will say phone added successfully
  6. run the app again, problem should be solved.
  1. 转到窗口设备和模拟器
  2. 选择无法运行的设备并右键单击,然后选择取消配对
  3. 现在这是关键部分,您的设备会自动请求信任,不要点击信任
  4. 焦点回到设备面板,左键单击+并添加设备,单击下一步,它会要求您点击面板中的“信任”
  5. 现在您可以点击手机中的“信任”,面板会提示手机添加成功
  6. 再次运行应用程序,问题应该解决了。

Ref: Link: https://forums.developer.apple.com/thread/108917

参考:链接:https: //forums.developer.apple.com/thread/108917

回答by Niib Fouda

I spend two days looking for the right answer.

我花了两天时间寻找正确的答案。

I tried unpairing my device and deleting the ~/Library/Developer/Xcode/iOS DeviceSupport/but nothing didn't work for me. The solution for me was to upgrade my MacOS to the latest version: Catalina 10.15.1. Then I have downloaded the latest Xcode 11.2.1_GM_Seed. I took the device support folder from the new Xcode and I added to my old Xcode.

我尝试取消我的设备配对并删除它,~/Library/Developer/Xcode/iOS DeviceSupport/但对我来说没有任何作用。我的解决方案是将我的 MacOS 升级到最新版本:Catalina 10.15.1。然后我下载了最新的 Xcode 11.2.1_GM_Seed。我从新的 Xcode 中获取了设备支持文件夹,并将其添加到我的旧 Xcode 中。

I guess the device Support in this linkhas something wrong. Because when I used it I got this error: "dyld_shared_cache_extract_dylibs failed"

我猜这个链接中的设备支持有问题。因为当我使用它时,我收到了这个错误:“dyld_shared_cache_extract_dylibs failed”

PS: This a solution for those who wants to run their project (written on Swift 4) on a real iPhone (OS 13.2)

PS:对于那些想要在真正的 iPhone (OS 13.2) 上运行他们的项目(用 Swift 4 编写)的人来说,这是一个解决方案