I’m using Xcode 13.4.1 (13F100)
on macOS Monterey 12.5 (21G72)
.
One of my real test devices (iPhone) has installed iOS 16.0 (20A5328h)
.
I’d like to run an app from Xcode on this iPhone. Since the iPhone uses a beta version I’m not able to use this device since it’s an Unavailable Device
with unsupported OS version
as you can see here:
This isn’t the first time I have to deal with a problem like this. Till now, I always downloaded the beta Xcode version, extracted the folder from DeviceSupport
and added it to my actual Xcode version. Then it worked.
I did the same this time. I downloaded the newest Xcode beta version, which also supports iOS 16. I added the folder 16.0
to /Volumes/Macintosh/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
.
The Unavailable Device
message disappeared and I was able to build the app on the iPhone. I even got the Build Succeeded
sign:
But then, a few seconds later, I get:
Failed to prepare device for development.
This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode. You may also need to restart your mac and device in order to correctly detect compatibility.
I already restarted both, iPhone and Mac but without success.
Why doesn’t it work this time? Is there any workaround?
3
Answers
I didn't find a workaround, so I simply downloaded the Xcode beta version, opened it, build the app to the iPhone and then deleted the beta version, since I only needed it for this one build.
I had the same problem. When you enable Developer Mode on the test device (Settings –> Privacy & Security –> Developer Mode), it works.
@David did you try my solution?
Check the compatibility of your Xcode version with the iOS version you are using. You can find this information on the Apple developer website: https://developer.apple.com/support/xcode/.
Check the list of devices that are supported by your Xcode version. To do this, go to the "Device Support" folder. To access this folder, open Finder, go to Applications, scroll down to Xcode, right-click, and select "Show Package Contents". Then go to Contents -> Developer -> Platforms -> iPhoneOS.platform -> DeviceSupport. This folder contains a list of devices that are supported by your Xcode version.
Check the iOS version of your iPhone device. To do this, go to Settings -> General -> About -> Software Version.
If the "Device Support" folder does not contain a folder for your iPhone’s iOS version, you need to add the respective folder. You can download the folder for your iOS version from this GitHub page: https://github.com/iGhibli/iOS-DeviceSupport/tree/master/DeviceSupport. Select your device version and download the zip file. Then extract the file to get the folder for your iOS version.
Copy the folder you just downloaded and extracted into the "DeviceSupport" folder mentioned in step 2.
Disconnect your device (if it’s connected) and restart Xcode.
Before connecting your device, delete the derived data from Xcode and clean the cache using cmd + shft + k.
Make sure to reset the "Location & Privacy" settings on your device. To do this, go to Settings -> General -> Transfer or Rest Phone -> Reset -> Reset Location & Privacy -> Enter passcode to continue.
Now connect your iPhone device to your MacBook using a cable. Xcode will detect your device and you can run your application.
I think there will be a solution if you don’t do the last three items.