Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Connect via network" wireless debugging not working Xcode 9

I am trying to run my iOS app via wifi network. But its not working as I expected.

Connected Network sign is not displaying.

enter image description here

I am using:

macOS Sierra - 10.12.6 (in Mac mini)

Xcode - 9.0 (9A235)

iOS - 11.0

NOTE: Mac mini and iPhone both are connected to same wifi network.

Already tried:

  1. Change another network

  2. Restart iPhone and Mac mini twice.

  3. Unpair Device and again pair device.

Am I missing something?

like image 820
Jay Patel Avatar asked Sep 20 '17 11:09

Jay Patel


People also ask

How do I connect my real device to Xcode?

Open the Product menu from Xcode's menubar, then go to Destination. Look for and select your device from the list. Xcode will then register your device for development.

How do I debug my iPhone using Xcode?

Run the AppView the status of the build in the activity area of the toolbar. If the build is successful, Xcode runs the app and opens a debugging session in the debug area. Use the controls in the debug area to step through your code, inspect variables, and interact with the debugger.


2 Answers

I was having the same issue and performed the following steps to get things working:

  1. Open "Devices and Simulators"
  2. Connect your device and check the "Connect via network" checkbox
  3. Disconnect your device
  4. Right click listing for your device in the left hand column (Under Disconnected)
  5. Select "Connect via IP Address.." and enter your device's IP address

enter image description here

like image 89
Andrew Meyer Avatar answered Oct 04 '22 09:10

Andrew Meyer


After numerous Wi-fi resets and device restarts (for iOS 12, Xcode 10) I found the solution for me was:

  1. Disconnect iOS device from Mac
  2. Go to Settings -> Develop on the iOS device
  3. Tap "Clear Trusted Computers"
  4. Reconnect iOS device to Mac via cable
  5. On iOS device tap "Trust This Computer" and enter passcode
  6. Go to Device Manager in Xcode and enable "Connect Via Network"

The network symbol appeared and I was good to go.

like image 44
adamjansch Avatar answered Oct 04 '22 08:10

adamjansch