Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iphone - Get host name by IP address

I have a list of ip addresses in my local wifi network (192.168.1.100-105). How can I get device names? For example "My desktop PC". Application like Fing can do it.

I've found some examples:

iPhone Tip: No NSHost

and

How to get Domain Name of ipAddress and ipAddress from Domain Name in objective-c

but looks like they works only with addressees from the internet, not from the local network.

Thank you!

like image 567
user1575129 Avatar asked Jan 28 '26 19:01

user1575129


1 Answers

There are three main protocols that you can use to get information about devices on your local network: Bonjour, NetBIOS and UPnP. Of these only the first one has build in support in iOS. So you will have to search for libraries or write your own implementation of the other two.

like image 52
idz Avatar answered Jan 30 '26 12:01

idz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!