public static function identifyIOS($model)
{
$original = $model;
$model = str_replace('Unknown ', '', $model);
$model = preg_replace("/iPh([0-9],[0-9])/", 'iPhone\\1', $model);
$model = preg_replace("/iPd([0-9],[0-9])/", 'iPod\\1', $model);
$device = new Device(['type' => Constants\DeviceType::MOBILE, 'identified' => Constants\Id::NONE, 'manufacturer' => null, 'model' => $model, 'identifier' => $original, 'generic' => false]);
if (isset(self::$IOS_MODELS[$model])) {
$match = self::$IOS_MODELS[$model];
$device->manufacturer = $match[0];
$device->model = $match[1];
$device->identified = Constants\Id::MATCH_UA;
if (isset($match[2]) || isset($match['type'])) {
$type = isset($match[2]) ? $match[2] : $match['type'];
$device->type = $type;
}
return $device;
}
return $device;
}