So I looked around, having read the very useful answer that Ege Akpinar gave earlier, and stumbled upon this article. They use the Apple's own Class, which can be used on Mac OSX and iOS:
Get ping latency from host
The link to Apple's Sample is available through the above link, but for the sake of efficiency and speed, here is its direct link:
https://developer.apple.com/library/mac/samplecode/SimplePing/Introduction/Intro.html#//apple_ref/doc/uid/DTS10000716-Intro-DontLinkElementID_2
I also found another post that shows how to implement the class using Swift. I thought I might include it, in case you are using Swift:
Using Simple Ping in swift (iOS)
I hope this will be of some use.