Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion SDVersion/SDiOSVersion/SDiOSVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

#import <Foundation/Foundation.h>

//current count is 44 enum
typedef NS_ENUM(NSInteger, DeviceVersion){
UnknownDevice = 0,
Simulator = 1,
Expand All @@ -25,6 +25,9 @@ typedef NS_ENUM(NSInteger, DeviceVersion){
iPhone8 = 14,
iPhone8Plus = 15,
iPhoneX = 16,
iPhoneXs = 39,
iPhoneXsMax = 40,
iPhoneXr = 41,
iPhoneSE = 17,

iPad1 = 18,
Expand All @@ -42,6 +45,9 @@ typedef NS_ENUM(NSInteger, DeviceVersion){
iPad5 = 30,
iPadPro12Dot9Inch2Gen = 31,
iPadPro10Dot5Inch = 32,
iPad6 = 42,
iPadPro11Inch3Gen = 43,
iPadPro12Dot9Inch3Gen = 44,

iPodTouch1Gen = 33,
iPodTouch2Gen = 34,
Expand Down
23 changes: 22 additions & 1 deletion SDVersion/SDiOSVersion/SDiOSVersion.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ + (NSDictionary*)deviceNamesByCode
@"iPhone10,5" : @(iPhone8Plus),
@"iPhone10,3" : @(iPhoneX),
@"iPhone10,6" : @(iPhoneX),
@"iPhone11,2" : @(iPhoneXs),
@"iPhone11,4" : @(iPhoneXsMax),
@"iPhone11,6" : @(iPhoneXsMax),
@"iPhone11,8" : @(iPhoneXr),
@"i386" : @(Simulator),
@"x86_64" : @(Simulator),

Expand Down Expand Up @@ -89,14 +93,25 @@ + (NSDictionary*)deviceNamesByCode
@"iPad7,2" : @(iPadPro12Dot9Inch2Gen),
@"iPad7,3" : @(iPadPro10Dot5Inch),
@"iPad7,4" : @(iPadPro10Dot5Inch),
@"iPad7,5" : @(iPad6),
@"iPad7,6" : @(iPad6),
@"iPad8,1" : @(iPadPro11Inch3Gen),
@"iPad8,2" : @(iPadPro11Inch3Gen),
@"iPad8,3" : @(iPadPro11Inch3Gen),
@"iPad8,4" : @(iPadPro11Inch3Gen),
@"iPad8,5" : @(iPadPro12Dot9Inch3Gen),
@"iPad8,6" : @(iPadPro12Dot9Inch3Gen),
@"iPad8,7" : @(iPadPro12Dot9Inch3Gen),
@"iPad8,8" : @(iPadPro12Dot9Inch3Gen),

//iPods
@"iPod1,1" : @(iPodTouch1Gen),
@"iPod2,1" : @(iPodTouch2Gen),
@"iPod3,1" : @(iPodTouch3Gen),
@"iPod4,1" : @(iPodTouch4Gen),
@"iPod5,1" : @(iPodTouch5Gen),
@"iPod7,1" : @(iPodTouch6Gen)};
@"iPod7,1" : @(iPodTouch6Gen)
};
#pragma clang diagnostic pop
});

Expand Down Expand Up @@ -185,6 +200,9 @@ + (NSString *)deviceNameForVersion:(DeviceVersion)deviceVersion
@(iPhone8) : @"iPhone 8",
@(iPhone8Plus) : @"iPhone 8 Plus",
@(iPhoneX) : @"iPhone X",
@(iPhoneXs) : @"iPhone XS",
@(iPhoneXsMax) : @"iPhone XS Max",
@(iPhoneXr) : @"iPhone XR",
@(iPhoneSE) : @"iPhone SE",

@(iPad1) : @"iPad 1",
Expand All @@ -202,6 +220,9 @@ + (NSString *)deviceNameForVersion:(DeviceVersion)deviceVersion
@(iPad5) : @"iPad 5",
@(iPadPro10Dot5Inch) : @"iPad Pro 10.5 inch",
@(iPadPro12Dot9Inch2Gen): @"iPad Pro 12.9 inch",
@(iPad6) : @"iPad 6",
@(iPadPro11Inch3Gen) : @"iPad Pro 11 inch 3rd Gen",
@(iPadPro12Dot9Inch3Gen): @"iPad Pro 12.9 inch 3rd Gen",

@(iPodTouch1Gen) : @"iPod Touch 1st Gen",
@(iPodTouch2Gen) : @"iPod Touch 2nd Gen",
Expand Down