I often use a Wi-Fi network where:
- Whatever mechanism Xcode uses to automatically discover a previously paired iOS device seems to be blocked (the Devices and Simulators window shows "Browsing on the local area network for [iPhone]" and never proceeds), but
- I can connect to the iOS device from my Mac if I know its IP address, such as by pinging it
The same hardware/software configuration works with wireless Xcode connections on a different Wi-Fi network.
Thus I'm wondering if there's any functionality that allows the IP address to be manually entered into Xcode to avoid needing to connect a cable from my Mac to my iPhone during development. Searching around seems to suggest this existed at some point in the past but I can no longer find this in a current version of Xcode. Or if there are any other workarounds, although I can't modify the network itself as it's not my network.
There are two main network level requirements for device connectivity with Xcode:
- The network supports Bonjour
- The network supports IPv6 with link-local traffic
It's likely that the network where you can't connect the devices to Xcode is missing one of those requirements, and you need work with the network owner to address those configurations. If the network owner here is a corporate IT department, the link above to TN3158 tackles a particular slice these configuration requirements for some VPN and security configurations, so your IT organization may get some value from reading through that document, though there are many other types of IT configurations that fall beyond the scope of that document.
There isn't a way to configure a device connection with just an IP address, neither with IPv4 or IPv6. You're correct that was possible a long time ago, but the inner workings of how Xcode and paired iOS devices communicate has significantly evolved since that time.
— Ed Ford, DTS Engineer