title |
---|
Connecting Problems with devices in WiFi debugging |
Table of Contents
-
Press
shift
+cmd
+2
and connect your device by usb cable. -
Check the box
Connect via network
and connect the same WiFi as your Mac ( LAN is also be a choice. But should be in same network. ) -
Unplug your device.
If you can't see your device in left area, congratulations!
Just reference in Apple Developer Forum answer
Unfortunately I do not see a "Connect via IP Address" option when I control-click on the device.
Yeah, that can be a bit persnickety. Here’s what I did to get it to show up:
- I turned off Wi-Fi on my device, just to be sure it wasn’t being seen on the network.
- I connected it via USB.
- In Xcode’s Devices window, I selected the device on the left.
- I enabled Connect via Network on the right.
- I disconnected the USB; the device moved to the Disconnected section.
- I control clicked on the device and Connect via IP Address shows up in the menu.
I didn’t actually choose the menu item because it wasn’t going to work because, hey, the Wi-Fi was off. But that should at least get it to show up.
Does that mean the AP is not forwarding multi-casts, or STA-to-STA traffic?
You can test this as follows:
-
Run through the process above.
-
In your Mac, start a Bonjour discovery from Terminal:
dns-sd -B _apple-mobdev2._tcp. local.
-
Turn on Wi-Fi on the device. You should see
dns-sd
log a line like this:
10:20:24.099 Add 2 5 local. _apple-mobdev2._tcp. 40:33:1a:d7:f4:9b@fe80::4233:1aff:fed7:f49b
where
40:33:1a:d7:f4:9b@fe80::4233:1aff:fed7:f49b
is the Bonjour service name (it seems that Xcode uses the MAC address and the link-local IPv6 for the service name, which is wacky but there you go).
If the service doesn’t show up, Wi-Fi multicast is disabled. In that case you can try the Connect via IP Address process described above. If that doesn’t work, it’s likely that all STA-to-STA networking is disabled.