How to run your app on the iPhone with the newest OS version via an older version of Xcode?

In this short post, I’ll explain how to run your app via an older version of Xcode (9.2 in my particular case) on your iPhone that has the newest OS (11.4.1 in my case at the time of this writing).

Say you update your iPhone OS to the newest version, and you open the project in an older version of Xcode and try to run it. You will most probably get an error similar to this (version numbers may vary):

Could not locate device support files on iPhone X (11.1) with Xcode (9.2 9C32c)

The problem has been addressed in these two StackOverflow posts:

The solution is basically to go on this Github project and download the device support files and place them in the DeviceSupport folder of your Xcode app.

You can get to the DeviceSupport folder by going into your Applications, find the Xcode app, right-click on it and select Show Package Contents. Then navigate to Contents > Developer > Platforms > iPhoneOS.platform > DeviceSupport and paste the contents of the downloaded file there.

All you have to do now is to restart Xcode and run the app again.

⚠️ Now here’s the potentially tricky party; you may realize that even though you’ve downloaded the correct support files from Github (and restarted Xcode) the Xcode is still not happy with it. Say for example you’ve downloaded 11.4 (15F79) but after restarting and running again you get an error mentioning something like 11.4.1 (15G77). The solution there is to just rename the folder to that, restart Xcode and voila, it works!

Hope this helps someone ?

Written by Nikola Brežnjak