Get host name From IP address iOS 10
问题 I need to fetch host name from ip address . Am able to fetch ip, mac addresses of all devices connected to my devices network, but hostname always returns nil . i had tried below code snippets to retrieve hostname but it always returns nil in my network CODE SNIPPET 1 +(NSString *)getHostFromIPAddress:(NSString*)ipAddress { struct addrinfo *result = NULL; struct addrinfo hints; memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_NUMERICHOST; hints.ai_family = PF_UNSPEC; hints.ai_socktype =