Tag: ip address

How to validate an IP address with regular expression in Objective-C?

How to validate an IP address in Objective-C?

Accessing IP Address with NSHost

I am trying to get the IP Address using NSHost. With the NSHost object I can use the addresses method to access an array of objects one of which is the IP Address. I fear though that the IP Address may change position in the array from one machine to the other. Is there a […]

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

I am able to get the current ip address of my device/machine that I am using – by using this question’s answer. I have gone through this question. Java allows to get the IPAddress from a domain name. Is it possible in objective c ? How ? The second question is How to get the […]

Objective-C : How to fetch the router address?

I tried to fetch the router address this way. – (NSString *) routerIp { NSString *address = @”error”; struct ifaddrs *interfaces = NULL; struct ifaddrs *temp_addr = NULL; int success = 0; // retrieve the current interfaces – returns 0 on success success = getifaddrs(&interfaces); if (success == 0) { // Loop through linked list […]

how to get ip address of iphone programmatically

This question already has an answer here: iPhone/iPad/OSX: How to get my IP address programmatically? 9 answers

Reachability with IP address won't work.

After inputting the Rechability classes Apple provided. Also after inputting this, Reachability reachabilityWithAddress:(const struct sockaddr_in *)hostAddress. How should we input the IP address we want to check into this line? This is the part where i’m really lost at.

How can I get a real IP address from DNS query in Swift?

I want to get the IP dress (like or from DNS query in Swift. I tried 100 times with 100 diffrent methods … Nothing helped me, so I’ll have to ask for help (I hope there are alots of folk here ;)) This is my code so far: let host = CFHostCreateWithName(nil,”subdomain.of.stackoverflow.com”).takeUnretainedValue(); CFHostStartInfoResolution(host, […]

Manage ifaddrs to return MAC addresses as well in Swift

I’ve got the following code that successfully retrieves all the IPs connected to my router. But I need to a get the MAC Addresses for each IP. So instead of addresses being returned as an array with [ips], be returned as a dictionary [ips:0000000, mac: 000000] Is it possible to be achieved with changes to […]

How to connect with Wifi Camera ios

I need some help, in my project i need to get images captured by wifi camera. I need to connect with that camera with IPAddress and get those images. I am completely new to this topic, so please suggest me that 1) How to connect with wifi cameras using IPAddress 2) How to get captured […]

How to Ping or check if server of particular IP Address is available/connected in iPhone

I want to Ping or Lookup a particular IP address of server if it is connected or available at that particular time or not in my iPhone application. I searched a lot over internet but could not find any relevant result for same. Please help me as I am new to this field. Thanks in […]