Commit 8ac9ef6a by Daniel Dahan Committed by GitHub

Merge pull request #1104 from OrkhanAlikhanov/new-devices

Added missing devices
parents 834e4a88 c0b03385
...@@ -34,7 +34,6 @@ import UIKit ...@@ -34,7 +34,6 @@ import UIKit
public enum DeviceModel: Int { public enum DeviceModel: Int {
case iPodTouch5 case iPodTouch5
case iPodTouch6 case iPodTouch6
case iPhone4
case iPhone4s case iPhone4s
case iPhone5 case iPhone5
case iPhone5c case iPhone5c
...@@ -45,6 +44,8 @@ public enum DeviceModel: Int { ...@@ -45,6 +44,8 @@ public enum DeviceModel: Int {
case iPhone6sPlus case iPhone6sPlus
case iPhone7 case iPhone7
case iPhone7Plus case iPhone7Plus
case iPhone8
case iPhone8Plus
case iPhoneX case iPhoneX
case iPhoneSE case iPhoneSE
case iPad2 case iPad2
...@@ -56,9 +57,12 @@ public enum DeviceModel: Int { ...@@ -56,9 +57,12 @@ public enum DeviceModel: Int {
case iPadMini2 case iPadMini2
case iPadMini3 case iPadMini3
case iPadMini4 case iPadMini4
case iPadProSmall case iPadPro
case iPadProLarge case iPadProLarge
case appleTV case iPad5
case iPadPro2
case iPadProLarge2
case iPad6
case simulator case simulator
case unknown case unknown
} }
...@@ -84,7 +88,6 @@ public struct Device { ...@@ -84,7 +88,6 @@ public struct Device {
switch identifier { switch identifier {
case "iPod5,1": return .iPodTouch5 case "iPod5,1": return .iPodTouch5
case "iPod7,1": return .iPodTouch6 case "iPod7,1": return .iPodTouch6
case "iPhone3,1", "iPhone3,2", "iPhone3,3": return .iPhone4
case "iPhone4,1": return .iPhone4s case "iPhone4,1": return .iPhone4s
case "iPhone5,1", "iPhone5,2": return .iPhone5 case "iPhone5,1", "iPhone5,2": return .iPhone5
case "iPhone5,3", "iPhone5,4": return .iPhone5c case "iPhone5,3", "iPhone5,4": return .iPhone5c
...@@ -93,9 +96,11 @@ public struct Device { ...@@ -93,9 +96,11 @@ public struct Device {
case "iPhone7,1": return .iPhone6Plus case "iPhone7,1": return .iPhone6Plus
case "iPhone8,1": return .iPhone6s case "iPhone8,1": return .iPhone6s
case "iPhone8,2": return .iPhone6sPlus case "iPhone8,2": return .iPhone6sPlus
case "iPhone8,4": return .iPhoneSE case "iPhone8,3", "iPhone8,4": return .iPhoneSE
case "iPhone9,1", "iPhone9,3": return .iPhone7 case "iPhone9,1", "iPhone9,3": return .iPhone7
case "iPhone9,2", "iPhone9,4": return .iPhone7Plus case "iPhone9,2", "iPhone9,4": return .iPhone7Plus
case "iPhone10,1", "iPhone10,4": return .iPhone8
case "iPhone10,2", "iPhone10,5": return .iPhone8Plus
case "iPhone10,3","iPhone10,6": return .iPhoneX case "iPhone10,3","iPhone10,6": return .iPhoneX
case "iPad2,1", "iPad2,2", "iPad2,3", "iPad2,4": return .iPad2 case "iPad2,1", "iPad2,2", "iPad2,3", "iPad2,4": return .iPad2
case "iPad3,1", "iPad3,2", "iPad3,3": return .iPad3 case "iPad3,1", "iPad3,2", "iPad3,3": return .iPad3
...@@ -106,9 +111,12 @@ public struct Device { ...@@ -106,9 +111,12 @@ public struct Device {
case "iPad4,4", "iPad4,5", "iPad4,6": return .iPadMini2 case "iPad4,4", "iPad4,5", "iPad4,6": return .iPadMini2
case "iPad4,7", "iPad4,8", "iPad4,9": return .iPadMini3 case "iPad4,7", "iPad4,8", "iPad4,9": return .iPadMini3
case "iPad5,1", "iPad5,2": return .iPadMini4 case "iPad5,1", "iPad5,2": return .iPadMini4
case "iPad6,3", "iPad6,4": return .iPadProSmall case "iPad6,3", "iPad6,4": return .iPadPro
case "iPad6,7", "iPad6,8": return .iPadProLarge case "iPad6,7", "iPad6,8": return .iPadProLarge
case "AppleTV5,3": return .appleTV case "iPad6,11", "iPad6,12": return .iPad5
case "iPad7,3", "iPad7,4": return .iPadPro2
case "iPad7,1", "iPad7,2": return .iPadProLarge2
case "iPad7,5", "iPad7,6": return .iPad6
case "i386", "x86_64": return .simulator case "i386", "x86_64": return .simulator
default: return .unknown default: return .unknown
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment