   
   if (hardware == "iPhone7,1")         { return Hardware.IPHONE_6_PLUS }
   if (hardware == "iPhone7,2")         { return Hardware.IPHONE_6 }
-    
   if (hardware == "iPhone8,2")         { return Hardware.IPHONE_6S_PLUS }
   if (hardware == "iPhone8,1")         { return Hardware.IPHONE_6S }
     

  return hardware
}

/** This method returns the Hardware enum depending upon harware string */
public func hardware() -> Hardware {
  let hardware = hardwareString()
  
  if (hardware == "iPhone1,1")         { return Hardware.IPHONE_2G }
  if (hardware == "iPhone1,2")         { return Hardware.IPHONE_3G }
  if (hardware == "iPhone2,1")         { return Hardware.IPHONE_3GS }
  if (hardware == "iPhone3,1")         { return Hardware.IPHONE_4 }
  if (hardware == "iPhone3,2")         { return Hardware.IPHONE_4 }
  if (hardware == "iPhone3,3")         { return Hardware.IPHONE_4_CDMA }
  if (hardware == "iPhone4,1")         { return Hardware.IPHONE_4S }
  if (hardware == "iPhone5,1")         { return Hardware.IPHONE_5 }
  if (hardware == "iPhone5,2")         { return Hardware.IPHONE_5_CDMA_GSM }
  if (hardware == "iPhone5,3")         { return Hardware.IPHONE_5C }

  return nil
}

///
/// This method returns the hardware number not actual but logically.
/// e.g. if the hardware string is 5,1 then hardware number would be 5.1
///
public func hardwareNumber(hardware: Hardware) -> CGFloat {
  switch (hardware) {
  case Hardware.IPHONE_2G:                         return 1.1
  case Hardware.IPHONE_3G:                         return 1.2
  case Hardware.IPHONE_3GS:                        return 2.1
    
  case Hardware.IPHONE_4:                          return 3.1
  case Hardware.IPHONE_4_CDMA:                     return 3.3
  case Hardware.IPHONE_4S:                         return 4.1
    
  case Hardware.IPHONE_5:                          return 5.1
  case Hardware.IPHONE_5_CDMA_GSM:                 return 5.2
  case Hardware.IPHONE_5C:                         return 5.3
  case Hardware.IPHONE_5C_CDMA_GSM:                return 5.4
  case Hardware.IPHONE_5S:                         return 6.1
  case Hardware.IPHONE_5S_CDMA_GSM:                return 6.2
    
  case Hardware.IPHONE_6_PLUS:                     return 7.1
  case Hardware.IPHONE_6:                          return 7.2
  case Hardware.IPHONE_6S_PLUS:                    return 8.2
  case Hardware.IPHONE_6S:                         return 8.1
    
