4

After upgrading Xcode I can not run my iPhone on the Xcode.

My Xcode waiting and waiting finally give an error like that and it stuck. Even though I unplugged the USB cable and delete derived data nothing changed.

I faced the same problem with upgrade Xcode to 12.0 12.1 and 12.2. Is there anything missing? What should I do to solve this issue?

zeytin
  • 5,545
  • 4
  • 14
  • 38
  • I always have a clean install of Xcode instead of upgrading Xcode directly from App Store, to clean up the cache and old support files. – Raptor Nov 17 '20 at 01:44
  • Does this answer your question? [iPhone is not available. Please reconnect the device](https://stackoverflow.com/questions/61863826/iphone-is-not-available-please-reconnect-the-device) – AMC Nov 28 '20 at 02:33
  • similar but i can not say as an answer – zeytin Jan 03 '21 at 21:46

2 Answers2

18

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

  • Restart the Xcode

That's all. You can build and go on your project.

Any comment for feedback will be appreciated :)

Visually solution :

Step 1 : Right Click Xcode and show package contents then follow the pictures below enter image description here Step 2 enter image description here Step 3: enter image description here Step 4: Here is Device Support Files Folder enter image description here Step 5: Put here file here and restart the Xcode if it is open enter image description here


Finally, Just in case it is a good idea delete derived data, press at the same time 4 keys like:

command + option + Shift + K (delete derived data shortcut)

zeytin
  • 5,545
  • 4
  • 14
  • 38
  • Having the same problem too. It used to work for on XCode 12.2 and iOS 14.2 and then just suddenly stopped. I get "Failed to prepare the device for development" in Devices window. Unpairing didn't help. I think I'm reinstalling the XCode the 5th time during the same month.. Can't wait for 2020 to end – inthy Nov 26 '20 at 13:57
  • 2
    @ErikPeruzzi You need clean the build, delete derived data and then run a fresh one. It'll work – iDeveloper Nov 28 '20 at 18:19
3

I did not try the solution above, but I had the exact same issue and as for me, all I needed to do is the following:

Go go to Devices and Simulators (CMD + Shift + 2) or by clicking Window and Devices and Simulator, find the device and right click to unpair it, and disconnect physically the device from your computer.

Xcode Unpair Device

Then while unpaired, restart Xcode and connect the device back again.

And then it worked for me :). But I do believe a solution proposed by zeytin might be necessary if what helped me fails.

Daniel Arden
  • 516
  • 5
  • 7