How to get the local IP address of the device?

I want to get the local IP address of my device. Now, devices have many interfaces, I'd like to get the one from my Wi-Fi card, for example.

Is there a way to do that via Foundation, for example? If not, is there other way?

This is a very tricky question. I have a bunch of info on this in the various posts linked to from Extra-ordinary Networking on DevForums.

ps This is kinda off topic for Swift Forums, where the focus is on the Swift language and standard library. If you have follow-up questions, I’d be happy to field them over on DevForums.

Share and Enjoy

Quinn “The Eskimo!” @ DTS @ Apple

2 Likes