6

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?

Michael Grinich
  • 4,770
  • 8
  • 29
  • 30

1 Answers1

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

Community
  • 1
  • 1
drvdijk
  • 5,556
  • 2
  • 29
  • 48
  • 2
    In 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