ios 如何修复 Xcode 错误:无法使用 Xcode 在 iPhone 上找到设备支持文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/47119186/
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
How to fix Xcode error: Could not locate device support files on iPhone with Xcode
提问by user2888798
I have this error for the new iPhone X:
Could not locate device support files.
This iPhone X (Model A1865, A1901, A1902, A1903) is running iOS 11.1 (15B93), which may not be supported by this version of Xcode.
找不到设备支持文件。
这款 iPhone X(型号 A1865、A1901、A1902、A1903)运行的是 iOS 11.1 (15B93),此版本的 Xcode 可能不支持。
I'm running the latest version of Xcode (Beta 9.2 9C32c) which doesn't support the iPhone X (iOS 11.1). The problem is it's a brand new iPhone, and there are no olderConfiguration Files to do the switch talked in most of the solved posts.
我正在运行不支持 iPhone X (iOS 11.1) 的最新版本 Xcode (Beta 9.2 9C32c)。问题是它是一个全新的 iPhone,并且在大多数已解决的帖子中都没有旧的配置文件来进行切换。
Are there any other solution to this issue since downloading the latest version of Xcode is already what I'm running, and finding the Configuration Files to do the switch seems unlikely right now? Does anyone have those Configuration Files or know how to edit them to trick Xcode?
是否有其他解决方案可以解决此问题,因为我已经在运行下载最新版本的 Xcode,而且现在似乎不太可能找到配置文件来进行切换?有没有人有这些配置文件或知道如何编辑它们来欺骗 Xcode?
采纳答案by Chris Herbst
I had the same issue with my iPhone 8, Xcode Beta 9.2 did not support my version of iOS 11.1.
我的 iPhone 8 也有同样的问题,Xcode Beta 9.2 不支持我的 iOS 11.1 版本。
However Xcode 9.1 does support my version of iOS 11.1
但是 Xcode 9.1 确实支持我的 iOS 11.1 版本
回答by Randika Vishman
Answer: Xcode: Could not locate device support files
答:Xcode:找不到设备支持文件
Well, I found non of the answers logged out here aren't complete and sustainable. So here we go.
好吧,我发现这里注销的答案都不是完整和可持续的。所以我们开始了。
Most importantly don't waste your time and internet bandwidth downloading Xcode just to resolve this issue which you can do within few MBs and little bit of OS know-how!!!
最重要的是不要浪费你的时间和互联网带宽下载 Xcode 只是为了解决这个问题,你可以在几 MB 和一点点操作系统专业知识内完成!
Step 1:
Following GitHub Repository seems to be up to date with all the required Support Files
which are helpful to resolve. And it seems like this repository gets updated quicker as possible. Check out it for yourself and you are halfway done.
第 1 步:关注
GitHub Repository 似乎是最新的,Support Files
其中包含所有有助于解决问题的必需信息。看起来这个存储库更新得越快越好。自己检查一下,你就完成了一半。
Step 2:
Select and download the Support files which are missing for your Xcode, which you can get the clue out of the above alert message. In my case I was informed to download 11.4 (15FCA...something). So I went and downloaded the latest iOS Support files:
第 2 步:
选择并下载您的 Xcode 缺少的支持文件,您可以从上述警报消息中获得线索。就我而言,我被告知下载11.4 (15FCA...something)。所以我去下载了最新的 iOS 支持文件:
Which were under the path of iPhoneOSDeviceSupport/11.4 (15F5061c)/
其中位于 iPhoneOSDeviceSupport/11.4 (15F5061c)/ 路径下
DeveloperDiskImage.dmg
DeveloperDiskImage.dmg.signature
Step 3:
And then place them inside the DeviceSupport folder which is in a related path to your Xcode installation. In my case, I've installed Xcode 9.2 so my path to DeviceSupport looks like as follows:
第 3 步:
然后将它们放在 DeviceSupport 文件夹中,该文件夹位于 Xcode 安装的相关路径中。就我而言,我已经安装了 Xcode 9.2,因此我的 DeviceSupport 路径如下所示:
/Applications/Xcode-9.2.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Step 4
Place the two files you downloaded in a folder named 11.4 (15F5061c)
.
Clue:In your case make sure to name it after the specific iOS version you downloaded the files.
步骤 4
将您下载的两个文件放在名为11.4 (15F5061c)
.
提示:在您的情况下,请确保以您下载文件的特定 iOS 版本命名。
Step 5:
Quit Xcode app if you had been already using it previously. Re-open it and try to run your app on your iPhone (or in iDevice of your previous attempt). Xcode will first warn you saying something like following:
第 5 步:
如果您之前已经使用过 Xcode 应用程序,请退出它。重新打开它并尝试在您的 iPhone(或您之前尝试的 iDevice)上运行您的应用程序。Xcode 会首先警告你说以下内容:
Preparing debugger support for Randika's iPhone 6s
为 Randika 的 iPhone 6s 准备调试器支持
Soon after it's completed (probably after several attempts that you may have to try reconnecting your iPhone to Xcode), you would be able to successfully run your app on your preferred device.
完成后不久(可能在多次尝试后,您可能不得不尝试将 iPhone 重新连接到 Xcode),您将能够在您的首选设备上成功运行您的应用程序。
How could you find this path?Go to your Applications folder, locate Xcode-x.x.app file, right click on the Xcode app and select "Show package contents" as follows:
你怎么能找到这条路?转到您的应用程序文件夹,找到 Xcode-xxapp 文件,右键单击 Xcode 应用程序并选择“显示包内容”,如下所示:
And then navigate to the DeviceSupportfolder within the Finder Appas follows:
然后导航到Finder 应用程序中的DeviceSupport文件夹,如下所示:
Hope this would be helpful to any of you!
希望这对你们中的任何人都有帮助!
Cheers!
干杯!
回答by Samkit Shah
This error can be fixed with 2 ways.
此错误可以通过 2 种方式修复。
1.You need to keep updated with latest Xcode versions.
1.您需要与最新的Xcode版本保持更新。
2.You can fix it without updating to latest Xcode, in this you just need to update device support file,
2.你可以在不更新到最新的Xcode的情况下修复它,你只需要更新设备支持文件,
To update device support file just follow the steps,
要更新设备支持文件,只需按照以下步骤操作,
You can find the Device support file and update it with the below path details,
您可以找到设备支持文件并使用以下路径详细信息进行更新,
Path-/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceS??upport/11.1
路径-/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceS??upport/11.1
You can download device support file from this links
您可以从此链接下载设备支持文件
回答by AshvinGudaliya
You can download all iOS-DeviceSupport
您可以下载所有iOS-DeviceSupport
iOS 13.0
iOS 13.0
- 13.3 (17C54)
- 13.2 (11C29) (From Xcode11.3)
- 13.2 (11B500) (From xCode11.2.1)
- 13.2 (From xCode_11.2.1_GM_Seed)
- 13.2 (From xCode_11.2_Beta_1)
- 13.1 (From xCode_13.1)
- 13.0 (From xCode_11_Beta_7)
- 13.0 (From xCode_11_Beta)
- 13.3 (17C54)
- 13.2 (11C29)(来自 Xcode11.3)
- 13.2 (11B500)(来自 xCode11.2.1)
- 13.2(来自 xCode_11.2.1_GM_Seed)
- 13.2(来自 xCode_11.2_Beta_1)
- 13.1(来自 xCode_13.1)
- 13.0(来自 xCode_11_Beta_7)
- 13.0(来自 xCode_11_Beta)
iOS 12.3
iOS 12.3
iOS 12.2
iOS 12.2
- 12.2 (16E226). (From Xcode_10.2.1)
- 12.2 (16E5212e). (From Xcode_10.2)
- 12.2 (16E5181e). (From Xcode_10.2_Beta)
iOS 12.1
iOS 12.1
- 12.1 (From Xcode_10.1)
- 12.1 (16B91). (From Xcode_10.1)
- 12.1 (16B5084a). (From Xcode_10.1_Beta_3)
- 12.1 (16B5068g). (From Xcode_10.1_Beta_2)
- 12.1 (16B5059d). (From Xcode_10.1_Beta)
- 12.1(来自 Xcode_10.1)
- 12.1 (16B91)。(来自 Xcode_10.1)
- 12.1 (16B5084a)。(来自 Xcode_10.1_Beta_3)
- 12.1 (16B5068g)。(来自 Xcode_10.1_Beta_2)
- 12.1 (16B5059d)。(来自 Xcode_10.1_Beta)
How to add a file in xCode
如何在xCode中添加文件
- Open Finder
- Open the application folder
- Find the Xcode app inside
- Click on Xcode, right click -> show package contents
Find the supported real machine test files in the following directory hierarchy:
Contents -> Developer -> Platforms -> iPhoneOS.platform -> DeviceSupport(/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport)
- 打开查找器
- 打开应用程序文件夹
- 在里面找到 Xcode 应用程序
- 单击Xcode,右键单击-> 显示包内容
在以下目录层次中找到支持的真机测试文件:
目录 -> 开发人员 -> 平台 -> iPhoneOS.platform -> DeviceSupport(/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport)
The above directory is the real version of iOS that Xcode supports real machine debugging, as shown below: Then copy the latest DeviceSupport file to this directory through other channels and restart XCodeto debug with the latest iOS device.
上面的目录是Xcode支持真机调试的真实iOS版本,如下图: 然后通过其他渠道把最新的DeviceSupport文件复制到这个目录下,重启XCode,用最新的iOS设备进行调试。
回答by Stan
I'm uncomfortable downloading shards from 3rd parties; also, it sounds like the iOS 13.2 support file linked above is based on a beta, which now crashes.
我对从 3rd 方下载分片感到不舒服;此外,听起来上面链接的 iOS 13.2 支持文件是基于 beta 的,现在它崩溃了。
I would recommend downloading Xcode directly from Apple, and install the new version side-by-side with the version of Xcode which you need to use (if you're pinned by a Swift binary framework, for example).
我建议直接从 Apple 下载 Xcode,并将新版本与您需要使用的 Xcode 版本并排安装(例如,如果您被 Swift 二进制框架固定)。
- rename your current Xcode application bundle (Xcode --> Xcode_11)
- download latest Xcode from AppStore (Xcode 11.2)
- launch new Xcode, installing Command Line Tools, then exit
- launch your older Xcode (Xcode_11), and build and run on device
- 重命名您当前的 Xcode 应用程序包 (Xcode --> Xcode_11)
- 从 AppStore 下载最新的 Xcode (Xcode 11.2)
- 启动新的 Xcode,安装命令行工具,然后退出
- 启动旧的 Xcode (Xcode_11),并在设备上构建和运行
回答by Andre V
I was able to run it, by first using BuddyBuild.com to send me a tester app through email, that I downloaded successfully. After that, I was able to build the app.
我能够运行它,首先使用 BuddyBuild.com 通过电子邮件向我发送一个测试应用程序,我成功下载了该应用程序。在那之后,我能够构建应用程序。
回答by Awais Nasir
In my case, device support files were already present but I was still facing the issue. The reason was that folder present at this path
就我而言,设备支持文件已经存在,但我仍然面临这个问题。原因是此路径中存在该文件夹
/Applications/Xcode-9.2.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
was having name 12.1 (16B91)but the xcode was giving error for 12.1 (16C101)so renaming the folder to 12.1 (16C101)did the trick
/Applications/Xcode-9.2.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
名称为12.1 (16B91)但 xcode 给出了12.1 (16C101) 的错误,所以将文件夹重命名为12.1 (16C101)就成功了
回答by www.brunoneves.com
- Open Xcode show package content
- go to /Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport and drop the 13.0 folder into this folder and restart the Xcode.
- 打开 Xcode 显示包内容
- 转到 /Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport 并将 13.0 文件夹放入此文件夹并重新启动 Xcode。
Download the file here: https://bitbucket.org/bneves/ios13_devicesupport_xcode_10.3/
在此处下载文件:https: //bitbucket.org/bneves/ios13_devicesupport_xcode_10.3/