When I attached my device to the xcode and try to build my project it's generating error

145 views Asked by At
Could not locate device support files. 

This iPhone 5s (Model A1457, A1518, A1528, A1530) is running iOS 10.3.1 (14E304), which may not be supported by this version of Xcode.

2

There are 2 answers

0
Alec O On

You need to update Xcode whenever the iOS version you want to work with is higher than the highest version that Xcode's simulator has installed. This can be done one of two ways. The simplest is to use the App Store to download/update Xcode. If the App Store doesn't show any updates, you must manually download the latest Xcode build from https://developer.apple.com/.

You will need to manually download from the Developer portal when the version of Xcode on your computer was downloaded there previously. For example, many beta testers may download the file directly instead of using the Mac App Store, since it is a beta download.

I would recommend trying to keep updates done through the App Store by downloading Xcode from there initially. The benefit to this is that it can automatically update as well as save space on your computer (Xcode is a big file, and you may not have enough space to download a new version if you still have the old version).

0
Lepidopteron On

As of the comments, I will now write an answer. :-)

Whenever you encounter this error there might be two reasons for that:

  1. The OS version is too old
  2. The iPhone's/iPad's OS is too new for your Xcode version

If it is too old, you may need to download older SDKs and OS versions. You can do so in Xcode. Go to "Preferences" -> "Components" and download the appropriate Simulator.

If the devices OS is up to date, you have to make sure your Xcode is also up to date. Either you update Xcode through the AppStore OR (and I prefer this way, as the AppStore is used to hang up in a certain state and cannot be completed any longer until you restart the Mac, at least I had this several times).

Side note: Xcode requires multiple GB of free storage. Make sure you have enough free storage left for an update.

You can download the latest Xcode version from the https://developer.apple.com portal: Go to Downloads:

Apple Developer Portal: Go to downloads

And then select the item of interest (in your case Xcode)

Apple Developer Portal: Select Xcode version to download