Developing for newer versions of iOS using an older version of Xcode


I recently ran into a situation where I wanted to hold off upgrading to MacOS 10.15 (Catalina) but needed to develop and test on my iPhone XS running iOS 13.5, which requires Xcode 10.4 that only runs on Catalina.

When running an app on the iPhone (rather than the simulator) in this situation, Xcode displayed an error, saying it could not locate device support files, a spinner, and only an option to Cancel Running:

Rather than updating Xcode, the solution is to install the device support files. The support files go into the following folder:

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

(hint: To open the Xcode.app package in Finder, right-click on Xcode.app, and Show Package Contents in the context menu)

In my case, the Xcode 11.3.1 iPhoneOS.platform folder contained subfolders containing support files for all iOS versions from version 8.0 up to 13.2.

To get the right device support file, you can download the latest Xcode package from developer.apple.com in .XIP format, extract the contents, resulting in an Xcode.app package, and open the Xcode.app package contents. Copy the support folders you need into the above folder on your computer. In my case, I copied the 13.3, 13.4, and 13.5 folders from Xcode 11.4.1 into my 11.3.1 App .

Attach the new device, restart Xcode, build the project (it may take some time to configure the device debugging files), then run!