My recommendation is that you not extract the IP address but instead get the
hostNameproperty and pass that to a connect-by-name API.
Also, keep in mind that if you want to listen for incoming connection over peer-to-peer Wi-Fi you must use
NSNetServicefor your listener (via
NSNetServiceListenForConnections). If you listen with BSD Sockets it just won’t work.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
Hi Eskimo, Thank you for the details. I will follow your recommendations.