ios Xcode:找不到设备支持文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39655178/
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
Xcode: Could not locate device support files
提问by Praveenkumar
As i am trying to run my application from newly updated Xcode 8to my iPhone 4which is running iOS 7.1.2
当我尝试将我的应用程序从新更新的Xcode 8运行到运行iOS 7.1.2 的iPhone 4 时
It throws below error,
它抛出以下错误,
And, this is my Xcodeversion,
而且,这是我的Xcode版本,
Does anyone faced this issue before? Awaiting for your suggestions!!
有没有人遇到过这个问题?等待您的建议!!
采纳答案by Durai Amuthan.H
Actually, there is a way. You just need to copy DeviceSupport folder for iOS 7.1 from Older Xcode to the new one. It's located in:
其实是有办法的。您只需要将 iOS 7.1 的 DeviceSupport 文件夹从旧 Xcode 复制到新的。它位于:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/7.1
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/7.1
If you don't have the 7.1 files anymore, you can download a previous version of XCode on https://developer.apple.com/download/more/, extract it, and then copy these files to following path
如果您不再拥有 7.1 文件,您可以在https://developer.apple.com/download/more/上下载以前版本的 XCode ,将其解压缩,然后将这些文件复制到以下路径
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
回答by Manny
I had a similar problem because the app store version was missing iOS 10.1 support in Xcode 8 and they haven't rolled an update yet. This caused the "Xcode: Could not locate device support files" problem. You can download the latest update https://developer.apple.com/download/and it is more current and supports iOS 10.1 (14B72c).
我遇到了类似的问题,因为应用商店版本在 Xcode 8 中缺少 iOS 10.1 支持,而且他们还没有推出更新。这导致了“Xcode:找不到设备支持文件”问题。您可以下载最新的更新https://developer.apple.com/download/,它更新并支持 iOS 10.1 (14B72c)。
回答by Gaby Fitcal
I have Xcode 10.1 and I can not run my application on my device with 12.2 iOS version.
我有 Xcode 10.1,但无法在 iOS 12.2 版本的设备上运行我的应用程序。
The easiest solution for me was:
对我来说最简单的解决方案是:
- Go with finder at Xcode location
- Right Click -> Show Package Contents
- Contents -> Developer -> Platforms -> iPhoneOS.platform -> DeviceSupport
- Here you find a list of supported version. Choose the most recent one and copy(In my case was 12.1 (16B91))
- Paste in the same folder(DeviceSupport) and call it with the version you need.(In my case was 12.2 (16E227))
- Close Xcode if you have it open
- Reconnect device if it was connected
- Open Xcode and build
- 在 Xcode 位置使用 finder
- 右键单击 -> 显示包内容
- 目录 -> 开发者 -> 平台 -> iPhoneOS.platform -> DeviceSupport
- 在这里您可以找到支持版本的列表。选择最新的并复制(在我的情况下是 12.1 (16B91))
- 粘贴在同一个文件夹中(DeviceSupport)并使用您需要的版本调用它。(在我的情况下是 12.2 (16E227))
- 如果打开 Xcode,请关闭它
- 如果已连接,则重新连接设备
- 打开Xcode并构建
If this trick does not working, you have to get the versions from the new Xcode version.
如果这个技巧不起作用,你必须从新的 Xcode 版本中获取版本。
But you can try, saves a lot of time. Good luck!
但是你可以试试,节省很多时间。祝你好运!
EDIT: Or you can download your needed device support from here: https://github.com/iGhibli/iOS-DeviceSupport/tree/master/DeviceSupport
编辑:或者您可以从这里下载您需要的设备支持:https: //github.com/iGhibli/iOS-DeviceSupport/tree/master/DeviceSupport
回答by Max Potapov
You need device support from previous version of Xcode (7.3.1).
您需要先前版本的 Xcode (7.3.1) 的设备支持。
I would recommend to use this tool: https://github.com/KrauseFx/xcode-install
我建议使用这个工具:https: //github.com/KrauseFx/xcode-install
When you install Xcode 7, you should link support files to Xcode 8:
安装 Xcode 7 时,您应该将支持文件链接到 Xcode 8:
sudo ln -s /Applications/Xcode-7.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/7.* \
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
回答by Sakshi Singla
This error is shown when your XCode is old and the related device you are using is updated to latest version. First of all, install the latest Xcode version.
当您的 XCode 较旧并且您使用的相关设备已更新到最新版本时,会显示此错误。首先,安装最新的Xcode版本。
We can solve this issue by following the below steps:-
我们可以按照以下步骤解决此问题:-
- Open Finder select Applications
- Right click on Xcode 8, select "Show Package Contents", "Contents", "Developer", "Platforms", "iPhoneOS.Platform", "Device Support"
- Copy the 10.0 folder (or above for later version).
- Back in Finder select Applications again Right click on Xcode 7.3, select "Show Package Contents", "Contents", "Developer", "Platforms", "iPhoneOS.Platform", "Device Support" Paste the 10.0 folder
- 打开 Finder 选择应用程序
- 右键单击 Xcode 8,选择“显示包内容”、“内容”、“开发者”、“平台”、“iPhoneOS.Platform”、“设备支持”
- 复制 10.0 文件夹(或更高版本的更高版本)。
- 回到 Finder 再次选择 Applications 右键单击 Xcode 7.3,选择“Show Package Contents”、“Contents”、“Developer”、“Platforms”、“iPhoneOS.Platform”、“Device Support” 粘贴 10.0 文件夹
If everything worked properly, your XCode has a new developer disk image. Close the finder now, and quit your XCode. Open your Xcode and the error will be gone. Now you can connect your latest device to old Xcode versions.
如果一切正常,您的 XCode 就有了一个新的开发者磁盘映像。现在关闭查找器,并退出您的 XCode。打开你的 Xcode,错误就会消失。现在您可以将最新的设备连接到旧的 Xcode 版本。
Thanks
谢谢
回答by Amrit Subedi
Here is the correct way of handling support errors from Xcode
. All you have to do is add support to Xcode's DeviceSupport
folder.
这是处理来自Xcode
. 您所要做的就是为Xcode's DeviceSupport
文件夹添加支持。
Open this link, extract the zip and copy the folder. https://github.com/mspvirajpatel/Xcode_Developer_Disk_Images/releases/tag/12.3.1
打开此链接,解压缩 zip 并复制文件夹。https://github.com/mspvirajpatel/Xcode_Developer_Disk_Images/releases/tag/12.3.1
NOTE: A new version of iOS 13.0 beta recently released. If your Xcode throws iOS 13.0 support files needed, then click the link below:
注意:最近发布了新版本的 iOS 13.0 测试版。如果您的 Xcode 抛出所需的 iOS 13.0 支持文件,请单击以下链接:
https://github.com/amritsubedi/iOS-Developer-Disk-Image/blob/master/13.0.zip
https://github.com/amritsubedi/iOS-Developer-Disk-Image/blob/master/13.0.zip
Then, go to Applications -> Xcode
. Right click and open Show Package Contents. Then, paste to Contents -> Developer -> Platforms -> iPhoneOS.platform -> DeviceSupport
and restart Xcode
.
然后,前往Applications -> Xcode
。右键单击并打开显示包内容。然后,粘贴到Contents -> Developer -> Platforms -> iPhoneOS.platform -> DeviceSupport
并重新启动Xcode
。
Note: If you have a problem with any other version of iOS, then download the right iOS Developer Disk Image and paste it in the above-mentioned folder.
注意:如果您在使用任何其他版本的 iOS 时遇到问题,请下载正确的 iOS 开发者磁盘映像并将其粘贴到上述文件夹中。
回答by Matthew Zourelias
Having the same exact issue with iOS 10.3 and Xcode 8.2.1. I'm not going to download the new Xcode beta just to fix this. Come on Apple!
iOS 10.3 和 Xcode 8.2.1 也有同样的问题。我不会为了解决这个问题而下载新的 Xcode 测试版。加油苹果!
To anyone reading this, you have to go to https://developer.apple.com/download/and get the latest version, which might even be the beta, if the stable release doesn't work.
对于阅读本文的任何人,如果稳定版本不起作用,您必须访问https://developer.apple.com/download/并获取最新版本,甚至可能是测试版。
In the future, I would be aware if you update iOS on your devices you may break Xcode/iOS version so update wisely if you want to keep testing on it without jumping through hoops that Apple makes.
将来,我会知道如果你在你的设备上更新 iOS,你可能会破坏 Xcode/iOS 版本,所以如果你想继续测试它而不跳过 Apple 制造的箍,那么明智地更新。
回答by catanore
If you have XCode 8.1 and iOS 10.2, update XCode manually to 8.2.1. For some reason App Store didn't offer this update.
如果您有 XCode 8.1 和 iOS 10.2,请手动将 XCode 更新到 8.2.1。出于某种原因,App Store 没有提供此更新。
回答by Jarda Pavlí?ek
In case of getting "Could not locate device support files" after your device iOS version has been updated and your Xcode is still old version, just copy old SDK under new name and restart Xcode. Open your terminal and do following:
如果在您的设备 iOS 版本更新后出现“无法找到设备支持文件”并且您的 Xcode 仍然是旧版本,只需将旧 SDK 复制到新名称下并重新启动 Xcode。打开终端并执行以下操作:
$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
$ cp -rpv 10.3.1\ \(14E8301\)/ 11.2.1
Restart Xcode and it will most probably work.
重新启动 Xcode,它很可能会工作。
回答by Sergei
Download & mount http://adcdownload.apple.com/Developer_Tools/Xcode_7.3.1/Xcode_7.3.1.dmgI was first wandered if it could be mounted directly through
hdiutil attach
and looks like it could but not for everyone's accounts.Open to see its content and copy
Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/7.1
to same path into Xcode application directory.- Restart Xcode
下载和挂载http://adcdownload.apple.com/Developer_Tools/Xcode_7.3.1/Xcode_7.3.1.dmg我第一次徘徊是否可以直接挂载
hdiutil attach
,看起来可以但不是每个人的帐户。打开以查看其内容并将其复制
Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/7.1
到 Xcode 应用程序目录中的相同路径。- 重启Xcode