106

After updating iPhone iOS version to 14.7+, Xcode 12.4 can no longer build to that iPhone device.

In Xcode when choosing a Build Destination (Product > Destination > [device] or from the UI dropdown shown below) the newly updated iPhone will have beside it (unsupported OS version):

xcode build destinations dropdown

iPhone listed with "(unsupported OS version)".

unsupported OS version

Can't Upgrade to Big Sur / Xcode 12.5

I'm stuck on Mac OS Catalina (old hardware) and cannot upgrade to Xcode 12.5 which requires Big Sur.

How can we add/update device support to Xcode to build to an unsupported iPhone version (iOS 14.7+)?

Baker
  • 24,730
  • 11
  • 100
  • 106

8 Answers8

187

Add/Update Unsupported iOS Version to Xcode

Apple has no plans to update Xcode 12.4 to support iOS 14.6, 14.7, etc.

But we can copy Xcode version 14.5 DeviceSupport files (download if needed) and paste (or symlink) them into directories named 14.6, 14.7, etc. (Thanks to @LPG for note on symbolic links.)

Xcode DeviceSupport Directories

Xcode DeviceSupport directories are located at: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

(In Finder, right-click on /Applications/Xcode & choose Show Package Contents)

Xcode DeviceSupport directories The list of directories will not include 14.6, 14.7 (or perhaps not even 14.5).

(If 14.5 directory is already present, simply copy/paste or symlink that directory to duplicate it with name as 14.6 or 14.7, etc. as needed, otherwise...)

Get DeviceSupport Files

The quickest way to grab device support files is from this (unofficial) Github project:

https://github.com/iGhibli/iOS-DeviceSupport

In particular, we want the 12.5 release candidate zip file (14.6, 14.7 do not exist yet):

https://github.com/iGhibli/iOS-DeviceSupport/blob/master/DeviceSupport/14.5(FromXcode_12.5_Release_Candidate_xip).zip

Inside the 12.5 Release Candidate in Github, download this .zip

download 12.5 DeviceSupport release candidate files

After the files are downloaded, double click on the .zip file to unpack them into a 14.5 directory:

14.5 DeviceSupport files

Add DeviceSupport 14.5 / 14.6 / 14.7 to Xcode

Copy and paste the 14.5 directory into /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport.

Make a duplicate of 14.5 directory by copy and pasting it into the same directory (into DeviceSupport) then rename the directory to 14.6, 14.7, etc. as necessary.

If Xcode is open, Clean Build Folder (under Product menu heading). I'm unsure if this is strictly necessary. (The next time I attached my phone, Xcode also updated & processed cache files from the device itself, which took several minutes.)

Close Xcode (if open).

Attach iPhone via USB. If you haven't already updated your Mac OS to support your phone on 14.6 / 14.7, your Mac may ask you to update the Mac OS software in order to connect to your iOS 14.6 / 14.7 device. I accepted this update request. It took several minutes to complete. (I believe this is unrelated to Xcode, rather iTunes, & other Mac services, etc.)

I needed to reboot my Mac after this. Unsure if this is required for everyone.

Open Xcode. Open the build destinations dropdown beside Runner and your iPhone 14.6 / 14.7 device should (hopefully) no longer has the "(unsupported os version)" note beside it.

Xcode Build Destinations 14.6 supported

Now as a supported 14.6 / 14.7 phone device under Xcode 12.4, you should be able to build debug, profile & release versions of your app to your physical iPhone.

Other Issues

"Errors were encountered while preparing your device for development. Please check the Devices and Simulators Window"

Baker
  • 24,730
  • 11
  • 100
  • 106
  • 4
    Probable duplicate of https://stackoverflow.com/questions/62526772/device-support-files-ios-14-for-xcode11 and many others. But I really cannot get behind the idea of doing something unsupported like this, and especially by downloading an insecure file. – matt Jun 07 '21 at 00:48
  • It works. XCode 12.3 (cannot upgrade, Catalina, old hardware), iPhone 14.6. – djdance Jun 08 '21 at 06:43
  • I follow the steps. However, it doesn't work. It gives me the error "Errors were encountered while preparing your device for development. Please check the Devices and Simulators Window. – Josepharaoh Jun 10 '21 at 20:06
  • 1
    @Josepharaoh I had the same issue. Rebooting phone solved it for me. Found that here: https://developer.apple.com/forums/thread/670748 I'll add this to answer for better visibility. – Baker Jun 10 '21 at 20:43
  • 1
    Many thanks. After I restart it. This shows up "the ios deployment target 'iphone os_deployment_target' is set to 8.0 but the range of supported" . I have to change the deployment target to 9. Now it works great. By the way, I turn off the ios auto upgrade on my phone to prevent this happen. However, it automatically turns on after I restart my iphone. That is really bugs me. – Josepharaoh Jun 11 '21 at 00:25
  • 1
    Got this error but restarting my iPhone worked!!! "Errors were encountered while preparing your device for development. Please check the Devices and Simulators Window" – coolcool1994 Jun 14 '21 at 04:28
  • Worked great for me! I copied the 14.5 folder from Xcode 12.5 to Xcode 12.4 and then duplicated 14.5 and renamed it to 14.6. I can now use for development my iPhone 6s Plus (iOS 14.6) on my Catalina system with Xcode 12.4. – Lewis Edward Garrett Jun 17 '21 at 16:24
  • Nice! It worked for me. iPhone 14.6 with Xcode 12.4. – Ho Chung Wong Jun 19 '21 at 12:27
  • This answer definitely works but after all of the steps in the answer I had to first reboot my iPhone, second do a clean inside Xcode (without the device attached), and third restart my computer. – Lance Samaria Jun 19 '21 at 16:18
  • Even though this answer does work I found a drawback. When using the visual debugger I always get `Unable to Capture View Hierarchy` and when I check the debugging console I get `error evaluating expression “(id)[[(Class)objc_getClass("DBGTargetHub") sharedHub] performRequestWithRequestInBase64:@"…"]”: error: Expression can't be run, because there is no JIT compiled function` and `-[DBGViewDebugger _initiateInitialRequestWithDataSourceVersion:]_block_invoke Environment: Xcode 12.4 (12D4e) debugging iPhone 11 iOS 14.6 (18F72)`. I can't use the visual debugger with an iPhone 11 – Lance Samaria Jun 21 '21 at 11:33
  • 4
    Still works for iOS 14.7. Using a symbolic link is enough, no actual copy needed. – LPG Jul 26 '21 at 15:58
  • Working accordingly after device restart, however breakpoint debugging is not happening. – Abhishek Mitra Sep 08 '21 at 07:59
  • @matt : you can find the device support in latest cCode versions , so no need to download files coming from not certified place. All xCode versions can be downloaded from apple developer site. – Ptit Xav Sep 15 '21 at 19:04
  • Why don't you accept this as an answer? – Sampath Sep 16 '21 at 14:48
  • does it works for adhoc version, I mean if I add the folder for iOS 15 in Xcode 12.5 the build and export app as adhoc, so that can I install it in iOS device running with iOS 15 – Ahmad Labeeb Sep 26 '21 at 19:43
  • 1
    For iOS 15, please download the image from this link: https://github.com/iGhibli/iOS-DeviceSupport/blob/master/DeviceSupport/15.0(FromXcode_13_beta_xip).zip. Then do the same thing as instructed in the above answer. (Please note that you will have to restart the device as well). Then you'll have 'Your device is busy copying cache files from device' once you hit 'run', now restart XCode again, it'll go away. Then you'll have 'code signature version is no longer supported' once you hit run again. Go to Build Settings, add '--generate-entitlement-der' under 'Signings'. – Ho Chung Wong Oct 10 '21 at 10:36
  • (continuation of the above comment) regarding to the error 'code signature version is no longer supported', you can refer to this answer: stackoverflow.com/a/68467307/9805796. However this method ain't gonna work with embedded targets. Please consider it a bit before you take this solution. Upgrade your XCode if needed. – Ho Chung Wong Oct 10 '21 at 11:12
5

This might be a temporary solution but here is what worked for me:

  1. Go into contents/Developer/platform/iPhoneOS.platform/DeviceSupport
  2. Copy your previous iOS 14.5 the device support file or older version
  3. Paste into the same folder and change the iOS number to 14.6
  4. Restart Xcode, and it should let you run your code on your phone

FYI this has worked for me before too for a different iOS so it might be able to help for later versions if anyone gets stuck or cant run Xcode on their phone.

Slava Vasylenko
  • 838
  • 1
  • 9
  • 14
5

@Baker's solution worked for me

In my case I had xcode 12.3 and wanted to run app on my iPhone ios 14.6

  1. close xcode

  2. download 14.5(FromXcode_12.5_Release_Candidate_xip).zip

  3. unzip 14.5(FromXcode_12.5_Release_Candidate_xip).zip it will give you folder 14.5

  4. copy folder 14.5 to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

  5. then copy folder 14.5 to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport and rename to 14.6

  6. after step 4 you should have something like ../iPhoneOS.platform/DeviceSupport/14.5 and ../iPhoneOS.platform/DeviceSupport/14.6

  7. launch xcode run your app

you might need to restart your iPhone if it stucks on iPhone is busy: Preparing debugger support for iPhone Xcode will continue when iPhone is finished.

sultanmyrza
  • 4,551
  • 1
  • 30
  • 24
3

Download iOS Device Support Here: https://youtu.be/akhC3W4S9a0?t=21

How to:

  • Download version you need listed above;

  • Unzip it;

  • Close Xcode;

  • Copy and paste unziped folder by path:

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

  • Restart Xcode

3
  1. Open Terminal and type
  2. open /applications/xcode.app/Contents/Developer/Platforms/iPhoneOS.platform

If you have more than 1 version open the one that you need

  1. On finder, Right Clic on latest version and Duplicate

  2. Change the name of version that you need

0

We need to add “Device Support Files” for device iOS version number in XCode App Content path

contents/Developer/platform/iPhoneOS.platform/DeviceSupport

To Download "Device Support Files" for desired iOS Version - You can download from internet by searching like this

ios 14.7 device support for xcode

I downloaded from this first link and paste in the above mentioned xcode App Content path where you must have to make folder first for Version number like 14.7. It worked then.

Link is: https://github.com/filsv/iPhoneOSDeviceSupport

Sajid Zeb
  • 1,806
  • 18
  • 32
0

This might not be the right answer for everyone, but for me I just needed to upgrade the operating system on my computer. (Note also that the error says "Unsupported OS version", not iOS version.) I was on Catalina with XCode 12.5. After upgrading to Monterrey with Xcode 13.1, all worked fine.

TM Lynch
  • 403
  • 3
  • 13
0

Use this link for updated support files.

https://github.com/iGhibli/iOS-DeviceSupport

Also, In case you are stuck between the version being launched and support files not updated on the link. Try renaming the last updated file folder with new version and paste it into the given directory. Tried that for iOS 15.6, Have renamed the 15.5 folder with 15.6 and it's working.

Rahul Verma
  • 688
  • 5
  • 17