Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get local network hostnames in iOS

I would like to get All device name in entire local network. I just been searching over 2 days and haven't find a solution yet.

I can able to get Bonjour services with using NSNetServiceBrowser. What i am trying to do is same as Fing app ( in app store) does.

As screenshot below, I would like to get "My iPhone" iPhone name with iOS.

Fing can fetch all device name entire local-network successfully

Regards

Onder

like image 242
Onder OZCAN Avatar asked Oct 30 '22 18:10

Onder OZCAN


1 Answers

Seems like NEHotspotHelper is what you're looking for. Specifically a class func supportedNetworkInterfaces() -> [Any] method.

In order to make it work, you'll need to accomplish some additional steps. Please, check this question to get more information.

Also don't forget to add NetworkExtension.framework to your target.

like image 84
Artem Stepanenko Avatar answered Nov 15 '22 05:11

Artem Stepanenko