PlainPing 0.5

PlainPing 0.5

LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Mar 2018
SwiftSwift Version 3.0

Maintained by Jonas Schoch.


A very plain ping interface to ping hostname or address, written in swift 3.0. The module uses SimplePing.

*To use the swift 2.2 version, select the PlainPing 0.2.2 tagged source or pod. *


To run the example project, clone the repo, and run pod install in the Example directory first.

PlainPing interface

There is one class function in PlainPing, call, completionBlock).

Example:"", withTimeout: 1.0, completionBlock: { (timeElapsed:Double?, error:Error?) in
    if let latency = timeElapsed {
        self.pingResultLabel.text = "latency (ms): \(latency)"

    if let error = error {
        print("error: \(error.localizedDescription)")


  • hostName: use a name or an IP
  • completionBlock: will return the elapsed time in ms and an error, if there is one
  • withTimeout: (optional), define how long we wait for an answer in seconds, default 3s


Minimum requirements unknown. Tested with the following:

  • xcode 8.0
  • CocoaPods 1.0


PlainPing is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "PlainPing"


Jonas Schoch, [email protected]


PlainPing is available under the MIT license. See the LICENSE file for more info.