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

Solution 1:

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!

Solution 2:

I had the same issue with my iPhone 8, Xcode Beta 9.2 did not support my version of iOS 11.1.

However Xcode 9.1 does support my version of iOS 11.1

Solution 3:

This error can be fixed with 2 ways.

1.You need to keep updated with latest Xcode versions.

2.You can fix it without updating to latest Xcode, in this you just need to update device support file,

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/

You can download device support file from this links

  • 11.1
  • 11.2
  • All iPhoneOSDeviceSupport

Solution 4:

You can download all iOS-DeviceSupport

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)

iOS 12.3

  • 12.3 (From xCode 11 beta)

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

  • 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)

How to add a file in 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)

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 XCode to debug with the latest iOS device.

enter image description here

Solution 5:

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.

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

  1. rename your current Xcode application bundle (Xcode --> Xcode_11)
  2. download latest Xcode from AppStore (Xcode 11.2)
  3. launch new Xcode, installing Command Line Tools, then exit
  4. launch your older Xcode (Xcode_11), and build and run on device