Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
316 views
in Technique[技术] by (71.8m points)

ios - How to fix Xcode error: Could not locate device support files on iPhone with Xcode

I have this error for the new iPhone X:
Error: Could not locate device support files

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.

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 older Configuration Files to do the switch talked in most of the solved posts.

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Answer: Xcode: Could not locate device support files

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!!!

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.

https://github.com/filsv/iPhoneOSDeviceSupport

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:

Which were under the path of iPhoneOSDeviceSupport/11.4 (15F5061c)/

DeveloperDiskImage.dmg
DeveloperDiskImage.dmg.signature

Files within the Repository for 11.4 latest version

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:

/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.

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:

Preparing debugger support for Randika's iPhone 6s

Preparing debugger support for Randika's iPhone 6s in Xcode

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.

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:

Where to find the DeviceSupport

And then navigate to the DeviceSupport folder within the Finder App as follows:

Navigate the folder tree

Hope this would be helpful to any of you!

Cheers!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...