426
votes

I'm looking for more information on the message below. Xcode 9 seems to be hanging for a couple minutes already...

How can I tell Xcode 9 to quickly recognize my previously used device updated to iOS 11?

.Alex’s iPhone is busy: Preparing debugger support for .Alex’s iPhone
Xcode will continue when .Alex’s iPhone is finished.

Xcode screenshot for above error message

30
I restarted the phone and waited for 1 min and then it worked.Michael Wang
I rebooted my phone and restarted XCode multiple times and it didn't help. I t worked after I rebooted my mac.Mercurial
This happened to my after I performed an iOS update on my iPhone 6. The progress bar at the top of the Xcode window should show the progress of whatever is going on in the background. I believe all it's doing is to load in crash logs/symbols/etc.... same as what happens every time you update the OS on your iDevice.Supertecnoboff

30 Answers

665
votes

There are multiple solutions for this:

Solution 1: Patiently wait for 10 to 15 minutes. Have a tea or roam around ;-)

Solution 2: Disconnect device from the system. Restart both iPhone and Xcode and then rebuild again.

Solution 3:

  1. Go to Windows → Devices and Simulators (Shortcut key: cmd+shift+2)

    Step 1

  2. You’ll see iPhone device connected to system with message

    iPhone is busy: Preparing debugger support for iPhone

  3. Click on plus button (+) present in bottom-left corner.

    Step2-3

  4. This will show the device connected to system. Click on Next button.

    Step 4

  5. Thereafter you’ll see ‘device setup was successful’. Click on Done button.

    Step 5

Solution 3 worked for me!

Solution 4:

Unpair your device and then pair it again. Thereafter follow Step 3.

222
votes

I clicked ‘Cancel Running’, opened the Devices list, unpaired my iPhone, removed my USB cable and reconnected it, paired the iPhone, and then was asked on my iPhone to enter my passcode ("pin code"). Did this and then was finally able to pair my phone correctly.

62
votes

Wait a few minutes. The application will start automatically

26
votes

Restarting Xcode worked for me (quit and start again).

What didn't work for me:

  • waiting for an hour on one device
  • waiting for an hour on another device
  • restarting devices
  • unpairing/pairing devices
16
votes

It turns out XCode opens device manager window beneath it and waits for you to hit the next button. Switch to that window, hit next and you get the progress bar for the process to show up.

enter image description here

enter image description here

13
votes

In my case, iTunes was open, so

1 - open iTunes

2 - access you phone

enter image description here

3 - click to disconnect your phone enter image description here

Now the device is ready on XCode

enter image description here

Hope it helps....

11
votes

below solution worked for me, follow steps to resolve your issue:

Step 1: Cancel Running

Step 2 : open Window menu and select Devices and Simulators

Step 3 : Unpair the iPhone

Step 4 : Removed iPhone USB cable and reconnect to the system

Step 5 : Pair the iPhone when you connect then you will be asked to Trust or Don't Allow, Please click Truct on your iPhone and enter your passcode (Pin Code)

Note : I performed all the above steps they worked for me. The issue of my device debugger gone.

Below is the Screenshot of Devices and Simulators Menu

enter image description here

10
votes

I unplugged my cable and saw this. After it reached the end I was able to run it no problems.

Xcode screenshot of status bar showing "Preparing debugger support"

You don't have to unplug to see this; just hit cancel and you will see its progress.

6
votes
  1. Click on Window menu
  2. Select Device and Simulators
  3. Select your device
  4. Click on + button at bottom left corner
  5. Click Next
  6. Click Done
5
votes

I found deleting the app from the device and re-installing with Xcode solved this issue.

4
votes

I realised I had less than 100 MBs of free space on my disc. Freeing up disk space solved the issue for me!

4
votes

Simple solution:

  • Open Window -> Devices and Simulators
  • Unpair iPhone on the side list
  • Unplug and plug again the USB cable
  • Press Trust in the prompt message in the device!
  • Then it should work! It worked for me
4
votes

I have been using my iPhone X to debug via Network and suddenly had this problem.

Disable "Connect via network" and try again with USB. This trick worked for me.

enter image description here

3
votes

When you plug a New device which is having iOS 11, Xcode 9 will Prepare Debugger Support for that device, At this time you should Wait to complete it.

Then run the project in that device it will run smoothly.

If you didn't keep patience while creating Debugger Support then it will throw the error mentioned in the question.

3
votes

The Best way:

  1. Disconnect the Iphone.
  2. Clean xcode by command+ shift + k or by going to Product -> Clean

Connect again

Run again

2
votes

rebooted iPhone, closed all other open applications and unlocked phone worked

2
votes

I had the same problem many times, these things worked for me:

  • restarting my phone + xCode.
  • checking that both your Mac and your iPhone are connected to the same Network.( has a high potential ).
  • repairing my phone.
2
votes

My setup

  • macOS 10.14.6
  • iOS 13.2.3
  • Xcode 11.2

Tried all the "speedrun" tips up till 2019-11-24 without luck. The wait seemed inevitable but incredibly long in my case:

with a freshly upgraded iOS version.

I then found this comment on reddit which makes the most sense:

This is required when you connect a device with an iOS version that the respective computer's Xcode didn't see before. It saves them in /Users/username/Library/Developer/Xcode/iOS DeviceSupport and it does take a while. Don't restart Xcode as it will not help you, just wait for it to finish.

It takes quite some time because these debugger support files occupy a lot of space (29 GB for me), though you can safely delete any version from there, and if you connect a device with that version again, it will re-save it from scratch.

So if you just upgraded your iOS, then the "from scratch" part could take longer than usual, also depending on your network condition. In my case, it is definitely much much longer than the "10-15min" other people claimed. I measure it by hours.

A lot of tricks seem to have worked but they neglect the fact that time goes on as you try things while Xcode keeps working on the setup in the background, and quite possibly resumes its job whenever you do a restart/reboot cycle.

This led me to noticing that my Xcode version is just one step behind the iOS point release. After upgrading my Xcode, it worked.

But it took longer because I removed the iOS DeviceSupport folder by following a tip!

So here are my suggestions:

  • Check your Xcode version down to the minor version to make sure it should actually support the iOS version.
  • Check your Mac's free disk space to make room for newly generated device support content under ~/Library/Developer/Xcode/iOS DeviceSupport as this tip suggested.
  • Check if you have connected your device to a fast-enough USB port, as this tip suggests.
  • Wait till Xcode finishes "preparing for debugging".
  • If it doesn't finish in a few seconds or minutes, keep waiting.
  • DO NOT remove any folder as some tips may suggest. Removal would simply make you wait longer!
1
votes

I updated to iOS 11.0.3 then the error appeared. After restarting my iPhone and XCode, it showed "Could not launch the app", so I navigated to the phone's device management to trust, then it solved.

1
votes

I had this problem because I hadn't given iTunes permissions to run on the computer. (I don't use iTunes for music, so I had foolishly just hit "decline" in annoyance whenever the EULA dialog box came up.)

1
votes
  • Unpaired my iPhone
  • Removed my USB cable and reconnected it (Do make sure that you unplugged the USB and plugged it back in)
  • Paired the iPhone.

(3 important steps)

1
votes

Clean : Shift-Command-K is what works for me.

1
votes

Xcode 10.3 Solution

The following error messages apply:

iPhone is busy: Preparing debugger support for iPhone Xcode will continue when iPhone is finished.

An error was encountered while attempting to communicate with this device. (The service is invalid.) Please try rebooting and reconnecting the device. (0xE8000022).


Follow the steps in Jayprakash Dubey's post above

and

  • Close Xcode;

  • Delete contents of DerivedData folder ~/Library/Developer/Xcode/DerivedData

  • Restart Xcode & iPhone

  • Pair Xcode & iPhone again

  • & run application

0
votes

I updated my iPhone to the latest version 11.0.3, then restarted my iPhone. Restarted my XCode 9. Then it worked.

0
votes

For those looking for solution with Apple TV, I just experience the exact problem "Apple TV is busy: Preparing debugger support for Apple TV” with Apple TV 4K with my Macbook Air (Early 2015)

The solution is not to unpair or restart devices. But to switch network. I brought it to a faster and more open network and it works perfectly.

0
votes

If running beta software and you update the OS, make sure to get the latest Xcode beta also. This fixed it for me.

0
votes

I left AppCode open while Xcode was trying to process the device, closing it solved the problem. Maybe can be one of the possible issues.

0
votes

For me it Worked after following the below steps

Step-1 Go to Devices and Simulator

enter image description here

Step-2 Deselect Show as run destination and Connect via network Options

enter image description here

Wait for Few seconds to Load the Xcode, If you want you can restart Xcode also.

Step-3 Follow the same steps and got to Devices and Simulators

Tick back both the options and it will be normal to install your app back.

0
votes

I had the same problem on macOS 10.14.5 using Xcode 10.2.1. After none of the solution here worked for me I restarted the Mac and this did the trick...

0
votes

I've faced the same problem because of a cable. I changed my third party USB/lighting cable into original Apple cable, and it worked.