Home > Software engineering >  Error in Xcode after adding DeviceSupport: Failed to prepare device for development
Error in Xcode after adding DeviceSupport: Failed to prepare device for development

Time:09-06

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:

enter image description 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:

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.

error

I already restarted both, iPhone and Mac but without success.

Why doesn't it work this time? Is there any workaround?

CodePudding user response:

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.

CodePudding user response:

I had the same problem. When you enable Developer Mode on the test device (Settings --> Privacy & Security --> Developer Mode), it works.

  • Related