I need to do a network ping in an iPhone app, but NSHost
is an unsupported framework for iPhone OS. Does anybody know of other tools or techniques to achive similar functionality?
Asked
Active
Viewed 4,455 times
6

Michael Grinich
- 4,770
- 8
- 29
- 30
-
1Some answers here: http://stackoverflow.com/questions/798454/how-to-write-a-simple-ping-method-in-cocoa-objective-c – Richard Stelling Jul 15 '09 at 19:11
1 Answers
0
Search for Reachability. Have a loot at e.g. this SO question. With this, you can test if a host can be reached.
HTH
-
2In this context the definition of reachable is that a packet can be sent out to a specific host. Reachability does not check if that packet ever makes it to the server. A ping would however send out the packet to the server, and wait for the server to return a packet. Reachability and Ping are therefore not interchangeable. – Tim Bodeit Jun 29 '14 at 18:34