简体   繁体   中英

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

Could not locate device support files. 

此iPhone 5s(型号A1457,A1518,A1528,A1530)运行的是iOS 10.3.1(14E304),此版本的Xcode可能不支持。

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

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:

苹果开发者门户:下载

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

Apple Developer Portal:选择要下载的Xcode版本

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM