Get local network hostnames in iOS
Asked Answered
B

1

6

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

Breakaway answered 12/10, 2016 at 22:6 Comment(5)
Did my answer help you? Or you need something different?Eiten
Hi @ArtemStepanenko, Your answer should be correct but i haven't tried yet because of waiting entitlement access from apple. Whenever it's ready i will try and mark your answer or if not i will let you know. Thank you for your helping !Breakaway
Cool, let me know!Eiten
I'm sorry for being annoying, but would be nice to see any response from you.Eiten
@OnderOZCAN can you explain what you exactly did or provide some useful links, code example, I have the same task, but i have no idea how to do itSheikh
E
3

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.

Eiten answered 12/10, 2016 at 22:44 Comment(4)
sorry for late response, it worked. Now i am creating UI, I will post the screenshot over here. Cheers :)Breakaway
That's great. I'm happy to know your problem is solved.Eiten
How to transfer file (Image, video, text etc) to this connected networkBeauteous
use this NEHotspotHelper can get devices name which connected to local net ? It seems like this will return wifi's info, not devices' info.Endorsee

© 2022 - 2024 — McMap. All rights reserved.