             return false
         }
 
-        let isReachable = flags.contains(.Reachable)
-        let needsConnection = flags.contains(.ConnectionRequired)
+        let isReachable = flags.contains(.reachable)
+        let needsConnection = flags.contains(.connectionRequired)
 
         return (isReachable && !needsConnection)
     }

    /* =============================================================
    // Connectivity testing code
    =============================================================== */
  public class func hasConnectivity() -> Bool {

        var zeroAddress = sockaddr_in()
        zeroAddress.sin_len = UInt8(sizeofValue(zeroAddress))
        zeroAddress.sin_family = sa_family_t(AF_INET)

        guard let defaultRouteReachability = withUnsafePointer(&zeroAddress, {
           SCNetworkReachabilityCreateWithAddress(nil, UnsafePointer($0))
        }) else {
            return false
        }

//import netinet/in.h>
//#import <SystemConfiguration/SystemConfiguration.h>

class CheckConnectivitySwift: NSObject {

    static let sharedInstance: CheckConnectivitySwift = {
        let instance = CheckConnectivitySwift()
