154

As I am trying to run my application from a newly updated Xcode 8 to my iPhone 4 which is running iOS 7.1.2, it throws the below error,

iOS 7.1.2

And, this is my Xcode version,

Xcode 8

How can I fix this problem?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Praveenkumar
  • 24,084
  • 23
  • 95
  • 173
  • 4
    FWIW, I'm getting a similar error but for Xcode 8.3.3 and an iPhone 7 Plus w/ iOS 10.3. – Jonny Jun 07 '17 at 03:41
  • I also see this after updating XCode 8.3 to 8.3.3 (iOS 10.3). Usually this happens when you update iOS without updating XCode. Weird, if 8.3 supports iOS 10.3, certainly 8.3.3 should too. – FryAnEgg Aug 02 '17 at 19:46
  • 1
    Download [iOS-device-support-files (GitHub)](https://github.com/Yatko/iOS-device-support-files) and copy to `/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport` – Yatko Jul 20 '20 at 15:51
  • Please review *[Why not upload images of code/errors when asking a question?](https://meta.stackoverflow.com/questions/285551/)* (e.g., *"Images should only be used to illustrate problems that* ***can't be made clear in any other way,*** *such as to provide screenshots of a user interface."*) and [do the right thing](https://stackoverflow.com/posts/39655178/edit). Thanks in advance. – Peter Mortensen Apr 14 '23 at 08:20

12 Answers12

103

Actually, there is a way. You just need to copy the DeviceSupport folder for iOS 7.1 from the older Xcode to the new one. It's located in:

/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, extract it, and then copy these files to following path

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/

Credit

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Durai Amuthan.H
  • 31,670
  • 10
  • 160
  • 241
  • NOTE: If you have multiple versions of Xcode then may have renamed your Xcode to something else e.g. `Xcode11` , so then the directory in my case changed to `Applications/Xcode11.app`... – mfaani Feb 27 '20 at 15:12
  • 1
    FWIW I just tried this the other way around – copying newer device support files from the latest Xcode into my installed older Xcode version, and it worked! (iOS 13.4 files copied into Xcode 11.3) – James May 22 '20 at 13:43
  • on Github support device files are availlable upto 16.0 but I have iphone of 16.2 version. What is its solution? – Muhammad Umair Saqib Feb 19 '23 at 06:33
83

I had a similar problem because the App Store version was missing iOS 10.1 support in Xcode 8 and they haven't rolled out an update yet.

This caused the "Xcode: Could not locate device support files" problem. You can download the latest update and it is more current and supports iOS 10.1 (14B72c).

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Manny
  • 1,682
  • 1
  • 14
  • 13
  • 143
    Upvoted. Does anybody else find this ridiculous? I get pestered to install this update to my iPhone, and when I finally relent I'm prevented from running my iOS app on it. Then I upgrade macOS thinking that must be the problem. Nope. Thirty minutes later and now I'm downloading a 4.1GB Xcode *beta* version to allow me to keep building to the iPhone I was nagged to upgrade. Not pleased. – aardvarkk Oct 26 '16 at 15:07
  • 8
    Yes, I find it ridiculous too, it's not just you! The worst thing is that the link provided by Manny above shows that Xcode 8.1 is available but when you click the download link it 'helpfully' opens the App Store on the Xcode page showing version 8.0 - with no option to download 8.1. So here I am unable to run up the app on a device because Apple can't get their act in gear. Wouldn't happen on Android ;-) – DilbertDave Oct 27 '16 at 18:59
  • @DilbertDave Ha! I can't believe they did that. Fortunately they finally updated the app store for 10.1. – Manny Oct 27 '16 at 19:55
  • 1
    I still see XCode 8.0 not 8.1 - using an iPhone 4s for testing in the meantime. – DilbertDave Oct 27 '16 at 19:57
  • 3
    Same exact problem now with 10.1.1... Thanks Apple – Aleksander Niedziolko Nov 02 '16 at 16:08
  • 5
    So mad at Apple right now. I had to dl XCode beta (which is NOT from a trusted developer?) Then upgrade to Sierra for THAT to run, then convert my project to SWIFT 3 (which Xcode SUCKS at). Oh but guess what? I use a number of cocoapods that are Swift 2.x!. So basically a full day of beachballs for some dot.dot.1 iOS upgrade that has no value whatsoever. – Gabriel Jensen Apr 26 '17 at 17:22
  • 1
    You guys are lucky , I am downloading a 7.1GB xcode installer now just because I updated my iphone to latest version – Leon Armstrong Jun 05 '19 at 05:32
51

I have Xcode 10.1, and I can not run my application on my device with the 12.2 iOS version.

The easiest solution for me was:

  1. Go with Finder at the Xcode location
  2. Right-click → Show Package Contents
  3. ContentsDeveloperPlatformsiPhoneOS.platformDeviceSupport
  4. Here you find a list of supported versions. Choose the most recent one and copy (in my case was 12.1 (16B91))
  5. Paste in the same folder (DeviceSupport) and call it with the version you need (In my case was 12.2 (16E227)).
  6. Close Xcode if you have it open
  7. Reconnect the device if it was connected
  8. Open Xcode and build

If this trick does not work, you have to get the versions from the new Xcode version.

But you can try; it saves a lot of time.

Or you can download your needed device support from here: iOS-DeviceSupport/DeviceSupport/

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Gaby Fitcal
  • 1,814
  • 1
  • 17
  • 28
29

You need device support from a previous version of Xcode (7.3.1).

I would recommend to use Xcode::Install.

When you install Xcode 7, you should link support files to 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/
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Max Potapov
  • 1,267
  • 11
  • 17
  • I followed your instructions and installed Xcode 7.3.1 using xcode-install. I then created symlinks for the 7.0 and 7.1 support files as in your instructions. But when I try to build my app with the target ios version being 7.1.2 (my iPhone 4) it still says "support files not found" same as before. Am I missing one more thing to make this work? – vesperknight Nov 09 '16 at 07:34
  • It worked fine for me. However, I downloaded the XCode-7 directly from the Apple-Developer web-site. – Ivan Nov 13 '16 at 16:59
  • 1
    you might also need to `chown -R` the added files for Xcode to be able to use them. – Axel Guilmin Dec 13 '16 at 14:28
  • Do NOT DOWNLOAD ANYTHING FROM UNKNOWN PARTIES. JUST get it from a friend or download a newer version of Xcode and move the files around – mfaani Feb 16 '21 at 15:50
21

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.

We can solve this issue by following the below steps:

  1. Open Finder and select Applications
  2. Right click on Xcode 8, select "Show Package Contents", "Contents", "Developer", "Platforms", "iPhoneOS.Platform", "Device Support"
  3. Copy the 10.0 folder (or above for later version).
  4. 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

If everything worked properly, your Xcode has a new developer disk image. Close 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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Sakshi Singla
  • 531
  • 6
  • 5
  • This method worked for me. Xcode 9.4.1 gave error but now can install on my iPhone iOS 10.0 – Andy Sep 20 '18 at 15:21
15

Here is the correct way of handling support errors from Xcode. All you have to do is add support to Xcode's DeviceSupport folder.

Open this link, extract the zip and copy the folder.

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:

Then, go to ApplicationsXcode. right-click and open Show Package Contents. Then, paste to ContentsDeveloperPlatformsiPhoneOS.platformDeviceSupport and restart 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.

This will work.

Press this to visually see the path.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Amrit Subedi
  • 431
  • 3
  • 11
9

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

To anyone reading this, you have to go to the download page and get the latest version, which might even be the beta, if the stable release doesn't work.

In the future, I would be aware if you update iOS on your devices you may break the Xcode/iOS version, so update wisely if you want to keep testing on it without jumping through the hoops that Apple makes.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
7

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Display Name
  • 4,502
  • 2
  • 47
  • 63
6

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 the old SDK under the new name and restart Xcode. Open your terminal and do the following:

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Jarda Pavlíček
  • 1,636
  • 17
  • 16
4
  1. Download and mount Xcode_7.3.1.dmg. I first wondered if it could be mounted directly through hdiutil attach, and it looks like it could, but not for everyone's accounts.

  2. Open to see its content and copy Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/7.1 to the same path into the Xcode application directory.

  3. Restart Xcode

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Sergei Krivonos
  • 4,217
  • 3
  • 39
  • 54
3

I got the same issue. Go to App Store and update Xcode.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Alessio Koci
  • 1,103
  • 11
  • 24
0

Get latest iOS-device-support-files (GitHub) (updated regularly). Download and copy iOS-device-support-files to:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Yatko
  • 8,715
  • 9
  • 40
  • 46