Xcode failed to prepare device for development

Post Views : 34

Issue

This Content is from Stack Overflow. Question asked and answered by David

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 bit without success.

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

Solution

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.

For more tutorials visit Jtuto.com


This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 4.0.

people found this article helpful. What about you?

Post Views : 63

Issue

This Content is from Stack Overflow. Question asked by jo1

I am trying to run my app on a physical device. The applicaiton builds but it doesnt deploy my app to the device.

I get this following error:

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.

Details:

I have xcode version 13.2.1
device is iphone 11 pro max with ios version 15.6 installed.

I tried to upgrade my xcode to 13.4.1 but on app store there is no button that indicates that i can upgrade.

Things I have tried:

restarting mac
restarting iphone device
closing and reopening xcode
cleaning project and rebuilding.

Any help will be appreciated.

Solution

Download xCode 13.4.1 directly using the link //download.developer.apple.com/Developer_Tools/Xcode_13.4.1/Xcode_13.4.1.xip

Answered by Arik Segal


This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 4.0.

people found this article helpful. What about you?

Questions : Xcode error: Failed to prepare device for development

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00

858

I have updated to Xcode 12.3 beta. device anycodings_beta version is 14.2, but Xcode complaining:

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

Failed to prepare device for development

iPhone directly connected to MacBook. I have anycodings_beta tried all mumbo jumbos on the web. but no anycodings_beta success any idea?

Unable to prepare DEVICE for development

Please check the connection to the device, anycodings_beta and review all errors in the Devices and anycodings_beta Simulators window.

Total Answers 30

31

Answers 1 : of Xcode error: Failed to prepare device for development

A simple phone restart will fix it

I have had to come back to this SO anycodings_iphone question twice in the past couple weeks. anycodings_iphone First time, I did have to update my anycodings_iphone Xcode and iOS versions, which fixed the anycodings_iphone issue. Now, the issue has returned, but anycodings_iphone there are no updates. I tried anycodings_iphone disconnecting and reconnecting my phone anycodings_iphone from my laptop, but to no avail.

What fixed it the second time was merely anycodings_iphone restarting my phone. I am curious if anycodings_iphone that would have fixed it the first time anycodings_iphone too, without needing to have updated.

I know this is just echoing the other anycodings_iphone answers here, but at the very least, I anycodings_iphone would recommend just starting with a anycodings_iphone simple phone restart and seeing if that anycodings_iphone fixes your problem. Here is the specific anycodings_iphone screenshot that I encountered, in case anycodings_iphone yours is the same (pro tip: you can open anycodings_iphone up the "Devices and Simulators" window anycodings_iphone by going to Window -> Devices and anycodings_iphone Simulators shift-command-2).

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

mRahman

3

Answers 2 : of Xcode error: Failed to prepare device for development

Exact same problem here, this solved the anycodings_iphone issue for me:

  • Delete the app from the phone
  • Clean the Build Folder with: ⌘ + shift + K
  • Delete derived data
  • Unpair device (from ⌘ + shift + 2 window)
  • Disconnect iPhone
  • Restart iPhone
  • Restart Mac
  • Trust

After this, it worked for me.

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

miraj

2

Answers 3 : of Xcode error: Failed to prepare device for development

This error shows because of iPhone OS anycodings_iphone version is not supported by Xcode that's anycodings_iphone why this warning popped up, so check anycodings_iphone which max ios version is supported by anycodings_iphone Xcode which you are using.

In my case, the Xcode version is 13.1 anycodings_iphone and my iOS version is 15.4 so what I anycodings_iphone did, First downloaded device support anycodings_iphone version 15.4 from here (Download anycodings_iphone according to your device version) and anycodings_iphone added this to my Xcode.

steps to add the file in Xcode:-

  1. Go to Applications > Right click on anycodings_iphone Xcode and Select Show Package Contents anycodings_iphone > Contents > Developer > anycodings_iphone Platforms > iPhoneOS.platform > anycodings_iphone DeviceSupport.

  2. Extract your device support file to anycodings_iphone DeviceSupport Folder.

  3. Restart Xcode and unplug and plug in anycodings_iphone your device.

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

miraj

6

Answers 4 : of Xcode error: Failed to prepare device for development

I restarted my iPhone(14.2); now both anycodings_iphone Xcode 12.3 beta and 12.2 can run app on anycodings_iphone my device.

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

jidam

3

Answers 5 : of Xcode error: Failed to prepare device for development

I could not get the phone to authorize anycodings_iphone until I had the paired Apple Watch trust anycodings_iphone the computer as well. A more helpful anycodings_iphone error message could be imagined.

Both the iPhone and the paired Apple anycodings_iphone Watch must trust the computer before the anycodings_iphone phone can be successfully prepared for anycodings_iphone development.

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

miraj

2

Answers 6 : of Xcode error: Failed to prepare device for development

In my case was to keep the iOS version anycodings_iphone with my Xcode version in sync.

Xcode 12.3 with iOS 14.3

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

joy

6

Answers 7 : of Xcode error: Failed to prepare device for development

What worked for me was to go to Xcode anycodings_iphone Devices and Simulators window, then ...

  • right click on the Connected device, and select "Show Provisioning Profiles" menu item, then delete all the provisioning profiles,
  • right click on the Connected device, and select "Unpair Device" menu item
  • Unplug and reboot the phone

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

raja

3

Answers 8 : of Xcode error: Failed to prepare device for development

Thanks Matt for hint: Updating device anycodings_iphone iOS to 12.3 beta fixed the problem.

if you updated you iOS to latest beta anycodings_iphone version, you should also use latest anycodings_iphone Xcode beta version.

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

raja

3

Answers 9 : of Xcode error: Failed to prepare device for development

I tried most suggestions here. The only anycodings_iphone thing that ended up working was anycodings_iphone unpairing my phone in Xcode then anycodings_iphone unpairing my apple watch from my iPhone. anycodings_iphone Connects just fine now. iOS (14.3) Xcode anycodings_iphone (12.3)

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

joy

5

Answers 10 : of Xcode error: Failed to prepare device for development

Exact the same problem with Xcode 12.3 anycodings_iphone beta ; for me, just have to: Disconnect anycodings_iphone the phone Restart the phone still on anycodings_iphone ios14.2

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

joy

6

Answers 11 : of Xcode error: Failed to prepare device for development

-> data cable off

-> data cable on

and it works :)

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

jidam

1

Answers 12 : of Xcode error: Failed to prepare device for development

Solution: Update your Xcode to a newer anycodings_iphone release date than your iOS Release Date.

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

joy

6

Answers 13 : of Xcode error: Failed to prepare device for development

I experienced this problem when using anycodings_iphone the iPhone's personal hotspot on my Mac. anycodings_iphone The fix was to disconnect the phone from anycodings_iphone the computer, then disconnect from the anycodings_iphone personal hotspot and reconnect again. anycodings_iphone Apparently this makes the mac use the anycodings_iphone wifi hotspot (and not the usb hotspot on anycodings_iphone the iPhone, which messes things up when anycodings_iphone debugging).

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

joy

6

Answers 14 : of Xcode error: Failed to prepare device for development

As many people mentioned/suggested, anycodings_iphone restarting my iPhone solved the problem.

My setups are: Catalina 10.15.7, Android anycodings_iphone Studio 4.0, Flutter 2.01,and Xcode 12.4.

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

joy

4

Answers 15 : of Xcode error: Failed to prepare device for development

I think having an apple watch paired to anycodings_iphone your iphone causes some issues.

I had trusted from my apple watch, but anycodings_iphone was still having this issue. Unparing my anycodings_iphone apple watch from my iphone was the only anycodings_iphone thing that worked for me:

  • unpair apple watch from iphone
  • unpair iphone from xcode

Restart both, and don't pair apple watch anycodings_iphone until the iphone is paired.

and, if you have any other problems, and anycodings_iphone are using flutter, run flutter doctor, anycodings_iphone and ensure you have cocoapods installed.

and once again, if Flutter issues, anycodings_iphone follow the details here to ensure you anycodings_iphone have your signing setup correctly

also, if things aren't working, then do anycodings_iphone a flutter clean, and then try again.

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

miraj

5

Answers 16 : of Xcode error: Failed to prepare device for development

I just solved my issue removing the anycodings_iphone iPhone cable and putting it back.

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

jidam

6

Answers 17 : of Xcode error: Failed to prepare device for development

This solved the issue for me:

  • Delete the app from the phone
  • Clean the Build Folder with: ⌘ + shift + K
  • Unpair device ⌘ + shift + 2
  • Disconnect iPhone

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

joy

6

Answers 18 : of Xcode error: Failed to prepare device for development

Updating Xcode is a fix because old anycodings_iphone versions of Xcode can't talk to new anycodings_iphone versions of iOS (see anycodings_iphone //developer.apple.com/support/xcode/ anycodings_iphone for compatibility).

If you're stuck on an old version of anycodings_iphone Xcode you can use something like anycodings_iphone //github.com/iGhibli/iOS-DeviceSupport anycodings_iphone or anycodings_iphone //github.com/filsv/iPhoneOSDeviceSupport anycodings_iphone which installs the newer device support anycodings_iphone files into older versions of Xcode.

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

joy

3

Answers 19 : of Xcode error: Failed to prepare device for development

Nothing from the above listed helped me anycodings_iphone and also I have encountered this problem anycodings_iphone when the app was removed for a while. anycodings_iphone But turning off the phone for 10 mins anycodings_iphone solved the problem.

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

raja

5

Answers 20 : of Xcode error: Failed to prepare device for development

My Current Setting and Versions: XCode anycodings_iphone 12.4 and iOS 14.4

  • I had to update XCode since my iOS was updated. This fixed the compiler error in Unity and then the same message popped up during deployment. All I did was disconnect/re-connect.

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

miraj

6

Answers 21 : of Xcode error: Failed to prepare device for development

Restarting the iPad works for me every anycodings_iphone time!

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

joy

2

Answers 22 : of Xcode error: Failed to prepare device for development

I just had to unpair the phone from anycodings_iphone Xcode's Devices and Simulators screen anycodings_iphone and then tap Trust when connecting it to anycodings_iphone the computer to make my Watch work with anycodings_iphone Xcode

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

joy

2

Answers 23 : of Xcode error: Failed to prepare device for development

  1. cmd + shift + 2
  2. Click the red cross to check error detail
  3. In most cases, the error message shows your xcode supported iOS version is lower than your iPhone's iOS version.
  4. Update your xcode.

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

raja

3

Answers 24 : of Xcode error: Failed to prepare device for development

In my case, after updating iPhone to a anycodings_iphone newer iOS version then got this issue.

The solution is needed to update XCode anycodings_iphone to the latest version and everything is anycodings_iphone ok.

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

miraj

6

Answers 25 : of Xcode error: Failed to prepare device for development

I had to change the iOs Deployment anycodings_iphone target to "iOs 15". Then it worked. anycodings_iphone After that, I just set it back to iOS anycodings_iphone 12, and everything keeps working.

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

miraj

6

Answers 26 : of Xcode error: Failed to prepare device for development

If nothing worked for you, try the below anycodings_iphone steps.

  • Update the Xcode
  • Update the iOS version
  • Connect mac and iPhone to the same wifi

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

joy

4

Answers 27 : of Xcode error: Failed to prepare device for development

just Clean the Build Folder with: anycodings_iphone ⌘ + shift + K

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

raja

4

Answers 28 : of Xcode error: Failed to prepare device for development

I got it resolved today by upgrading OS anycodings_iphone on my Mac to 12.3.1 and Xcode to 13.3.1 anycodings_iphone as well as restarting and re-connecting anycodings_iphone devices couple of times.

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

jidam

5

Answers 29 : of Xcode error: Failed to prepare device for development

In my case solution was:

  • General settings on phone device
  • Profiles & Device Management
  • Open developer app and click on Trust

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

joy

6

Answers 30 : of Xcode error: Failed to prepare device for development

I got the same error message after anycodings_iphone updating Xcode to 12.4. I have anycodings_iphone disconnected and reconnected iPad. Then, anycodings_iphone I have waited for 1 or 2 minutes for anycodings_iphone Xcode to process device's cache files. anycodings_iphone Finally, I could run my application in anycodings_iphone device.

0

2022-09-23T15:09:17+00:00 2022-09-23T15:09:17+00:00Answer Link

joy

Does Xcode 13 support iOS 11?

Xcode 13 requires a Mac running macOS 11.3 or later.

Where is the devices and simulators window Xcode?

The basic way to open a list of simulators is to use Xcode -> Window -> Devices and Simulators. Here you can create and manage all available simulators.

How do I restart Xcode on Mac?

Delete your Xcode preferences: In Terminal, enter defaults delete -app xcode. That resets ~/Library/Preferences/com. apple..
Quit Xcode and relaunch..
Clean the project..
Restart the Mac..
Delete derived data..

How do I run an Xcode emulator?

Open Xcode and click Menu > Xcode > Preferences > Select Components, and then choose the simulator version you want to download. When a simulator is opened from AppStudio, AppStudio Player automatically installs (if necessary) and opens in it.

Toplist

Latest post

TAGs