Building mobile apps for newer iOS versions on older Xcode versions
In this example I will be building for iOS 13.2 on Xcode 10.3, but the same concepts work for any version of Xcode or iOS.
One issue that many people run into is that when Apple releases a new version of Xcode and iOS, developers are not always ready to update to the newest version of Swift and Xcode as quickly. By default, older versions of Xcode are not compatible with the latest version of iOS. This is because each version of Xcode is released with “device files” that allow it to build for each version of iOS. Older versions of Xcode can build for newer versions of iOS if you link the device files from the newer version of Xcode into the version that you are using.
Instructions for building app for iOS 13.2 on Xcode 10.3:
Make sure that you have Xcode 10.3 installed in your applications folder, and it works for building other versions. It is preferable that you have downloaded this from the “Software downloads” page of developer.apple.com rather than the app store.
Go to the “Software downloads” page of developer.apple.com. From here, download the Xcode 11.2 beta version, unzip it, and place it into your applications folder along with Xcode 10.3. NOTE: if you are copying device files from a version of Xcode that is not a beta version, you will need to rename it to avoid overwriting your existing version of Xcode. You will also need to change the file name in the command below from Xcode-beta.app to <Xcode-renamed-by-you>.app or it will not work.
Quit any versions of Xcode that you have open. Open a terminal window and run the following command:
You should now be able to run apps on iOS 13.2 on Xcode 10.3.
A couple notes:
You need to keep both versions of Xcode in your applications folder for this to work. This is because you have not actually copied the device files, only made a symbolic link to them in your original version of Xcode.
You will need to redo this process any time a new version of Xcode and iOS comes out so you can add the new device files for future versions of iOS.