iPhone not connected. Xcode will continue when iPhone is connected

IosIphoneXcode

Ios Problem Overview


I have my iPhone connected to Xcode. It used to work just fine recently. I see it in the Devices and Simulators section, but when I try to compile my app, it says:

> D's iPhone 6S is not connected. Xcode will continue when D's iPhone 6S is connected.

In the Devices and Simulators I see it as disconnected.

I tried restarting the phone, turning it's wifi on and off. It's connected to the same wifi network, I tried restarting Xcode, nothing. I run Xcode 9, Beta 6 at the moment. Does anyone has similar issue and hopefully know how to solve it?

Ios Solutions


Solution 1 - Ios

Troubleshooting:

  1. plug in your iPhone.
  2. Open Xcode
  3. go to window -> Devices and Simulators
  4. Right click on your device
  5. click Unpair Device and unplug it.
  6. restart Xcode
  7. restart your iPhone.
  8. Connect your iPhone via USB
  9. run your app
  10. then unplug it, and it should run via the wifi again.

Set up

  1. Window -> Devices and Simulators

enter image description here

  1. Choose your device from the list.

enter image description here

  1. Tick the box for "connect via network."

enter image description here

Solution 2 - Ios

In Window > Devices and Simulators, right click on your iPhone and "Connect with IP address", then enter the iPhone IP address and you're connected.

Solution 3 - Ios

Turn off WIFI on Mac, and also on your iPhone too. Then turn on WIFI again on both devices.

I frequently face this issue since I don't use USB cable to build the app to my iPhone. So this is my usual way to resolve the connection problem.

Solution 4 - Ios

As Sam H.'s answer, can Connect via IP Address. This is XCode 9 or 9.1 's function. And need your device update to iOS11 +

enter image description here

Solution 5 - Ios

Apparently, more people have this issue. The only "solution" I found was to connect the iphone with a USB, run the app and then try to run it using wifi. This usually solves my problem.

Solution 6 - Ios

Restarting the wifi on my Mac worked for me.

Solution 7 - Ios

You can also connect via IP address

While Xcode is open, go to

Windows -> Device and Simulators

right click your device and connect via IP address. You can get your phone IP address from settings under wifi and clicking the info button on the network.

Solution 8 - Ios

I'm using Xcode 9.1 and suddenly had this issue.After reading other answers a realized it is a Xcode bug via wifi debug.My solution was to connect the iphone with a USB, then go to the Add Additional Simulators,then come to the interface below,uncheck "connect via network". Problem sovled,and back to debug via a USB.

enter image description here

Solution 9 - Ios

Making Cellular data Off solved my problem

Solution 10 - Ios

I had to update Xcode in my case. I tried literally everything else in this thread.

Solution 11 - Ios

I was able to reconnect using this method:

  1. Disconnect/Unplugged the device from Mac
  2. Close X-Code
  3. Run "sudo pkill usbmuxd" in terminal
  4. Reopen Xcode
  5. Reconnect Device

Try this if unpairing method does not work.

Solution 12 - Ios

I had this issue when I changed my network connection on my Mac and in this case reconnecting the phone with an USB cable doesn't work. I had to restart xCode.

Solution 13 - Ios

Also make sure your iOS device is on the same wifi network as your Mac, otherwise Xcode will insist you connect your device via USB, even if you've checked the box to use wireless development for that device.

Solution 14 - Ios

Make sure your Mac and device connected in same network(Wi-Fi) connection.

Solution 15 - Ios

This is just to add the other possible reasons that the answers forgot to mention:

You got a new phone and Xcode is trying to connect to the old phone: Window<< Devices and Simulators: Press the + button and connect your phone via usb cable and click
your on your device. It should add it at that point.

You could also try running bluetooth instead of wifi, but it might still do the same problems. Make sure your device is connected correctly

Solution 16 - Ios

I had to reopen Xcode with my iPhone X unlocked and then I had to open Windows->Devices immediately afterwards.

Then the message was changed into:"iPhone X is busy: Preparing debugger support for iPhone X"

Solution 17 - Ios

There could be more than one reason why xcode forgets the device often. One of them could be the dynamic IP which is assigned automatically.

Apart from general troubleshooting (device is unlocked etc), here are few suggestions based on my experience.

  1. Check if you are using the SAME WIFI on computer and device.

  2. In Xcode > Devices and Simulators > Right Click > Unpair Device and connect again.

  3. Prefer to use static IP. At least for the device (Give Manual IP address in the iPhone).

  4. In Xcode > Devices and Simulators > Connect via IP Address

  5. Use USB cable to run the app and then unplug to use wireless solves it most often.

  6. Disconnect and Reconnect Wireless on Computer & Mobile Device

  7. Turn off the Cellular Data

  8. Turn off any VPN you are using.

  9. Check your Network Settings on Computer and Device. Disable any suspecious setting (Proxy etc).

  10. Restart Device and Computer. It often resolves few network interface problems.

Solution 18 - Ios

1 - Go to Xcode - Window - Device and simulator - Unpair device 2 - Xcode and Mac both are restart and open Xcode again and connect your device Via USB cable and run it.

Solution 19 - Ios

  1. Restart Xcode & if issue persists do steps 2-4.
  2. Open Devices and Simulators window in Xcode (shortcut is ⌘⇧2 command+shift+2)
  3. Make sure your device is active (press home button & enter passcode if needed)
  4. Open terminal & run netstat command.

You device will be reconnected

Solution 20 - Ios

In my case a pending software update on my iPhone was preventing it from accepting new builds from Xcode - even over USB.

I tried all the other suggestions in this thread and nothing worked, but accepting the pending update on my phone fixed the problem.

Solution 21 - Ios

Just in case someone did what I did: I used to have wireless connection with my mac mini but one day I decided to use a cable. From that day I had problems with my devices, I always had to use usb the first time I opened Xcode. When I removed cable connection everything worked fine as before.

Solution 22 - Ios

I tried a combination of the above solutions and can't pinpoint what solved it.

When Xcode was stuck on trying to connect to my wireless iPad, I had to do was start browsing with Safari on my iPad. I think that somehow refreshes the network on the iPad.

The Xcode's 'Device and simulator' may not properly reflect the connection status between the device and mac so after browsing with your iPad/iPhone hit run on Xcode and then just wait till they find each other

Solution 23 - Ios

I had the same problem yesterday/today. Tried the various suggestions here but none worked. Except maybe, restarting the iPhone. I was able to install my app!!

Previously I had a Xcode/iOS version mismatch but currently at 12.2/14.2 which should and finally did work.

Solution 24 - Ios

My problem was actually the cable itself, seems that some of the cheap cable you buy might not work 100% with your ipad/iphone. Try with a different cable

Solution 25 - Ios

You must put a passcode on the device, otherwise wifi debugging will not work.

Solution 26 - Ios

Unlock your iPhone or iPad (helped me).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDaniView Question on Stackoverflow
Solution 1 - IosScottyBladesView Answer on Stackoverflow
Solution 2 - IosSamuel HassidView Answer on Stackoverflow
Solution 3 - IoschoofieView Answer on Stackoverflow
Solution 4 - IosJerryZhouView Answer on Stackoverflow
Solution 5 - IosDaniView Answer on Stackoverflow
Solution 6 - IosBuzzLightyearView Answer on Stackoverflow
Solution 7 - IosSteeven SylveusView Answer on Stackoverflow
Solution 8 - IosLin MayView Answer on Stackoverflow
Solution 9 - IosManish MahajanView Answer on Stackoverflow
Solution 10 - IosMike LyonsView Answer on Stackoverflow
Solution 11 - IosAnsyar HafidView Answer on Stackoverflow
Solution 12 - IosBeninho85View Answer on Stackoverflow
Solution 13 - Iostodd412View Answer on Stackoverflow
Solution 14 - IosRahul PanzadeView Answer on Stackoverflow
Solution 15 - IosKodeView Answer on Stackoverflow
Solution 16 - IosJustForHelpView Answer on Stackoverflow
Solution 17 - IosNaveed AbbasView Answer on Stackoverflow
Solution 18 - Iosuser11803319View Answer on Stackoverflow
Solution 19 - Iosuser1988View Answer on Stackoverflow
Solution 20 - IosmintymuzView Answer on Stackoverflow
Solution 21 - IosThomasView Answer on Stackoverflow
Solution 22 - IosmfaaniView Answer on Stackoverflow
Solution 23 - IosDBourneView Answer on Stackoverflow
Solution 24 - IosloonixView Answer on Stackoverflow
Solution 25 - IosPedro Paulo Costa JúniorView Answer on Stackoverflow
Solution 26 - IosVlad VolkovView Answer on Stackoverflow