I write this post in part for my future self because I run into this issue at least once a year. The story goes something like this. You are using Xcode 14 for your daily development and Apple releases iOS 17. You eagerly upgrade to iOS 17 to try out the latest and greatest Apple has to offer. The next time you try to deploy a build to that device, Xcode shows you a dialog that says Could not locate device support files.

Could not locate device support files. You may be able to resolve the issue by installing the latest version of Xcode from the Mac App Store or developer.apple.com.

Xcode is correct, though. Xcode 14 doesn't have the device support files for your device running iOS 17. Most developers don't have the luxury to switch to the latest version of Xcode the day it is released. The good news is that you don't need to update Xcode. You can continue to use Xcode 14.

What Do You Need?

If you want to deploy that build to your device, then you need a version of Xcode that includes the device support files for your device. What does that mean? Let's say you updated your device to iOS 17. Xcode 14 doesn't support iOS 17. Xcode 15 does so you need to download Xcode 15 first.

Locating the Device Support Files

You downloaded a version of Xcode that supports the operating system your device is running. Right-click the Xcode version you just downloaded and choose Show Package Contents from the contextual menu.

Could Not Locate Device Support Files

Navigate to Contents > Developer > Platforms > iPhoneOS.platform > DeviceSupport. The DeviceSupport directory contains the device support files for the versions Xcode supports.

Locating the Device Support Files in Finder

If your device runs a beta version, then it is possible that the directory that contains the device support files for your device is named a bit differently, for example, 16.1 (15AB74UD74). In that scenario, it typically contains a suffix, an alphanumeric string. Don't worry about this, though.

Fixing the Problem

With the device support files for your device located, you have two options. You can copy the directory that contains the device support files for your device to the DeviceSupport directory of the Xcode version that displays the Could not locate device support files dialog. That is Xcode 14 in the example I gave earlier. That is the easiest option.

Another option is creating a symbolic link, a symlink for short, from the DeviceSupport directory for your device to the DeviceSupport directory of the Xcode version that doesn't support the new operating system.

I typically copy the directory so I don't need to worry about the newer Xcode version being replaced, deleted, or moved. That's a personal preference, though.

Disabling Automatic Updates

This problem not only occurs when you install a beta version of the operating system, it can also happen when you simply install the latest stable release of iOS, tvOS, iPadOS, or watchOS.

Say you are using Xcode 14.2 on your Mac and you have iOS 16.3 installed on your iPhone. If you have automatic system updates enabled on your iPhone and Apple releases iOS 16.4, it is possible you won't be able to deploy to your device using Xcode 14.2. What happens after updating the operating system of your device depends on which versions Xcode supports.

The point is that, as a developer, you should disable automatic updates of the operating system to avoid surprises. The last thing you want is see the aforementioned dialog minutes before you are expected to deliver a build for a hot fix.

To disable automatic updates of the operating system, open the Settings application on your device and navigate to General > Software Update. You should see a setting at the top to enable and disable automatic updates. Note that this setting isn't the same as the setting to enable and disable automatic updates of third party applications. It is fine to leave that setting as is.

As a developer, you should disable automatic updates of the operating system to avoid surprises.