1、设备型号对应常用名称
设备型号 |
名称 |
iPhone3,1 |
iPhone 4 |
iPhone3,2 |
iPhone 4 |
iPhone3,3 |
iPhone 4 |
iPhone4,1 |
iPhone 4S |
iPhone5,1 |
iPhone 5 |
iPhone5,2 |
iPhone 5 |
iPhone5,3 |
iPhone 5c |
iPhone5,4 |
iPhone 5c |
iPhone6,1 |
iPhone 5s |
iPhone6,2 |
iPhone 5s |
iPhone7,1 |
iPhone 6 Plus |
iPhone7,2 |
iPhone 6 |
iPhone8,1 |
iPhone 6s |
iPhone8,2 |
iPhone 6s Plus |
iPhone8,4 |
iPhone SE |
iPhone9,1 |
iPhone 7 |
iPhone9,2 |
iPhone 7 Plus |
iPhone9,3 |
iPhone 7 |
iPhone9,4 |
iPhone 7 Plus |
iPhone10,1 |
iPhone 8 |
iPhone10,2 |
iPhone 8 Plus |
iPhone10,4 |
iPhone 8 |
iPhone10,5 |
iPhone 8 Plus |
iPhone10,3 |
iPhone X |
iPhone10,6 |
iPhone X |
iPhone11,2 |
iPhone XS |
iPhone11,4 |
iPhone XS Max |
iPhone11,6 |
iPhone XS Max |
iPhone11,8 |
iPhone XR |
iPhone12,1 |
iPhone 11 |
iPhone12,3 |
iPhone 11 Pro |
iPhone12,5 |
iPhone 11 Pro Max |
iPhone12,8 |
iPhone SE 2 |
iPhone13,1 |
iPhone 12 mini |
iPhone13,2 |
iPhone 12 |
iPhone13,3 |
iPhone 12 Pro |
iPhone13,4 |
iPhone 12 Pro Max |
iPhone14,4 |
iPhone 13 mini |
iPhone14,5 |
iPhone 13 |
iPhone14,2 |
iPhone 13 Pro |
iPhone14,3 |
iPhone 13 Pro Max |
设备型号 |
名称 |
iPad1,1 |
iPad |
iPad1,2 |
iPad 3G |
iPad2,1 |
iPad 2 |
iPad2,2 |
iPad 2 |
iPad2,3 |
iPad 2 |
iPad2,4 |
iPad 2 |
iPad2,5 |
iPad Mini |
iPad2,6 |
iPad Mini |
iPad2,7 |
iPad Mini |
iPad3,1 |
iPad 3 |
iPad3,2 |
iPad 3 |
iPad3,3 |
iPad 3 |
iPad3,4 |
iPad 4 |
iPad3,5 |
iPad 4 |
iPad3,6 |
iPad 4 |
iPad4,1 |
iPad Air |
iPad4,2 |
iPad Air |
iPad4,3 |
iPad Air |
iPad4,4 |
iPad Mini 2 |
iPad4,5 |
iPad Mini 2 |
iPad4,6 |
iPad Mini 2 |
iPad4,7 |
iPad Mini 3 |
iPad4,8 |
iPad Mini 3 |
iPad4,9 |
iPad Mini 3 |
iPad5,1 |
iPad Mini 4 |
iPad5,2 |
iPad Mini 4 |
iPad5,3 |
iPad Air 2 |
iPad5,4 |
iPad Air 2 |
iPad6,3 |
iPad Pro 9.7 |
iPad6,4 |
iPad Pro 9.7 |
iPad6,7 |
iPad Pro 12.9 |
iPad6,8 |
iPad Pro 12.9 |
iPad6,11 |
iPad 5 |
iPad6,12 |
iPad 5 |
iPad7,1 |
iPad Pro 12.9 inch 2nd gen |
iPad7,2 |
iPad Pro 12.9 inch 2nd gen |
iPad7,3 |
iPad Pro 10.5 inch |
iPad7,4 |
iPad Pro 10.5 inch |
iPad7,5 |
iPad 6 |
iPad7,6 |
iPad 6 |
iPad7,11 |
iPad 7 |
iPad7,12 |
iPad 7 |
iPad8,1 ~ 8,4 |
iPad Pro 11-inch |
iPad8,5 ~ 8,8 |
iPad Pro 12.9-inch 3rd gen |
iPad8,9 ~ 8,10 |
iPad Pro 11-inch 2nd gen |
iPad8,11 ~ 8,12 |
iPad Pro 12.9-inch 4th gen |
iPad11,1 |
iPad Mini 5 |
iPad11,2 |
iPad Mini 5 |
iPad11,3 |
iPad Air 3 |
iPad11,4 |
iPad Air 3 |
iPad11,6 |
iPad 8 |
iPad11,7 |
iPad 8 |
iPad13,1 |
iPad Air 4 |
iPad13,2 |
iPad Air 4 |
iPad12,1 |
iPad 9 |
iPad12,2 |
iPad 9 |
iPad14,1 |
iPad Mini 6 |
iPad14,2 |
iPad Mini 6 |
iPad13,4 ~ 13,7 |
iPad Pro 11-inch 3nd gen |
iPad13,8 ~ 13,11 |
iPad Pro 12.9-inch 5th gen |
设备型号 |
名称 |
iPod1,1 |
iPod Touch 1G |
iPod2,1 |
iPod Touch 2G |
iPod3,1 |
iPod Touch 3G |
iPod4,1 |
iPod Touch 4G |
iPod5,1 |
iPod Touch 5G |
iPod7,1 |
iPod Touch 6G |
iPod9,1 |
iPod Touch 7G |
设备型号 |
名称 |
i386 |
Simulator |
x86_64 |
Simulator |
2、代码获取
// 获取设备型号然后手动转化为对应名称:新出的设备需要在这里手动添加
+ (NSString *)device_Name {
// 需要#import "sys/utsname.h"
struct utsname systemInfo;
uname(&systemInfo);
NSString *platform = [NSString stringWithCString:systemInfo.machine
encoding:NSUTF8StringEncoding];
// iPhone
if ([platform isEqualToString:@"iPhone1,1"]) return @"iPhone 2G";
if ([platform isEqualToString:@"iPhone1,2"]) return @"iPhone 3G";
if ([platform isEqualToString:@"iPhone2,1"]) return @"iPhone 3GS";
if ([platform isEqualToString:@"iPhone3,1"]) return @"iPhone 4";
if ([platform isEqualToString:@"iPhone3,2"]) return @"iPhone 4";
if ([platform isEqualToString:@"iPhone3,3"]) return @"iPhone 4";
if ([platform isEqualToString:@"iPhone4,1"]) return @"iPhone 4S";
if ([platform isEqualToString:@"iPhone5,1"]) return @"iPhone 5";
if ([platform isEqualToString:@"iPhone5,2"]) return @"iPhone 5";
if ([platform isEqualToString:@"iPhone5,3"]) return @"iPhone 5c";
if ([platform isEqualToString:@"iPhone5,4"]) return @"iPhone 5c";
if ([platform isEqualToString:@"iPhone6,1"]) return @"iPhone 5s";
if ([platform isEqualToString:@"iPhone6,2"]) return @"iPhone 5s";
if ([platform isEqualToString:@"iPhone7,1"]) return @"iPhone 6 Plus";
if ([platform isEqualToString:@"iPhone7,2"]) return @"iPhone 6";
if ([platform isEqualToString:@"iPhone8,1"]) return @"iPhone 6s";
if ([platform isEqualToString:@"iPhone8,2"]) return @"iPhone 6s Plus";
if ([platform isEqualToString:@"iPhone8,4"]) return @"iPhone SE";
if ([platform isEqualToString:@"iPhone9,1"]) return @"iPhone 7";
if ([platform isEqualToString:@"iPhone9,2"]) return @"iPhone 7 Plus";
if ([platform isEqualToString:@"iPhone10,1"]) return @"iPhone 8";
if ([platform isEqualToString:@"iPhone10,4"]) return @"iPhone 8";
if ([platform isEqualToString:@"iPhone10,2"]) return @"iPhone 8 Plus";
if ([platform isEqualToString:@"iPhone10,5"]) return @"iPhone 8 Plus";
if ([platform isEqualToString:@"iPhone10,3"]) return @"iPhone X";
if ([platform isEqualToString:@"iPhone10,6"]) return @"iPhone X";
if ([platform isEqualToString:@"iPhone11,2"]) return @"iPhone XS";
if ([platform isEqualToString:@"iPhone11,6"]) return @"iPhone XS MAX";
if ([platform isEqualToString:@"iPhone11,8"]) return @"iPhone XR";
if ([platform isEqualToString:@"iPhone12,1"]) return @"iPhone 11";
if ([platform isEqualToString:@"iPhone12,3"]) return @"iPhone 11 Pro";
if ([platform isEqualToString:@"iPhone12,5"]) return @"iPhone 11 Pro Max";
if ([platform isEqualToString:@"iPhone12,8"]) return @"iPhone SE (2nd generation)";
if ([platform isEqualToString:@"iPhone13,1"]) return @"iPhone 12 mini";
if ([platform isEqualToString:@"iPhone13,2"]) return @"iPhone 12";
if ([platform isEqualToString:@"iPhone13,3"]) return @"iPhone 12 Pro";
if ([platform isEqualToString:@"iPhone13,4"]) return @"iPhone 12 Pro Max";
if ([platform isEqualToString:@"iPhone14,4"]) return @"iPhone 13 mini";
if ([platform isEqualToString:@"iPhone14,5"]) return @"iPhone 13";
if ([platform isEqualToString:@"iPhone14,2"]) return @"iPhone 13 Pro";
if ([platform isEqualToString:@"iPhone14,3"]) return @"iPhone 13 Pro Max";
if ([platform isEqualToString:@"iPhone14,6"]) return @"iPhone SE 3";
if ([platform isEqualToString:@"iPhone14,7"]) return @"iPhone 14";
if ([platform isEqualToString:@"iPhone14,8"]) return @"iPhone 14 Plus";
if ([platform isEqualToString:@"iPhone15,2"]) return @"iPhone 14 Pro";
if ([platform isEqualToString:@"iPhone15,3"]) return @"iPhone 14 Pro Max";
// iPod
if ([platform isEqualToString:@"iPod1,1"]) return @"iPod Touch 1";
if ([platform isEqualToString:@"iPod2,1"]) return @"iPod Touch 2";
if ([platform isEqualToString:@"iPod3,1"]) return @"iPod Touch 3";
if ([platform isEqualToString:@"iPod4,1"]) return @"iPod Touch 4";
if ([platform isEqualToString:@"iPod5,1"]) return @"iPod Touch 5";
if ([platform isEqualToString:@"iPod7,1"]) return @"iPod Touch 6";
if ([platform isEqualToString:@"iPod9,1"]) return @"iPod Touch 7";
// iPad
if ([platform isEqualToString:@"iPad1,1"]) return @"iPad 1";
if ([platform isEqualToString:@"iPad2,1"]) return @"iPad 2";
if ([platform isEqualToString:@"iPad2,2"]) return @"iPad 2";
if ([platform isEqualToString:@"iPad2,3"]) return @"iPad 2";
if ([platform isEqualToString:@"iPad2,4"]) return @"iPad 2";
if ([platform isEqualToString:@"iPad2,5"]) return @"iPad Mini 1";
if ([platform isEqualToString:@"iPad2,6"]) return @"iPad Mini 1";
if ([platform isEqualToString:@"iPad2,7"]) return @"iPad Mini 1";
if ([platform isEqualToString:@"iPad3,1"]) return @"iPad 3";
if ([platform isEqualToString:@"iPad3,2"]) return @"iPad 3";
if ([platform isEqualToString:@"iPad3,3"]) return @"iPad 3";
if ([platform isEqualToString:@"iPad3,4"]) return @"iPad 4";
if ([platform isEqualToString:@"iPad3,5"]) return @"iPad 4";
if ([platform isEqualToString:@"iPad3,6"]) return @"iPad 4";
if ([platform isEqualToString:@"iPad4,1"]) return @"iPad Air";
if ([platform isEqualToString:@"iPad4,2"]) return @"iPad Air";
if ([platform isEqualToString:@"iPad4,3"]) return @"iPad Air";
if ([platform isEqualToString:@"iPad4,4"]) return @"iPad Mini 2";
if ([platform isEqualToString:@"iPad4,5"]) return @"iPad Mini 2";
if ([platform isEqualToString:@"iPad4,6"]) return @"iPad Mini 2";
if ([platform isEqualToString:@"iPad4,7"]) return @"iPad mini 3";
if ([platform isEqualToString:@"iPad4,8"]) return @"iPad mini 3";
if ([platform isEqualToString:@"iPad4,9"]) return @"iPad mini 3";
if ([platform isEqualToString:@"iPad5,1"]) return @"iPad mini 4";
if ([platform isEqualToString:@"iPad5,2"]) return @"iPad mini 4";
if ([platform isEqualToString:@"iPad5,3"]) return @"iPad Air 2";
if ([platform isEqualToString:@"iPad5,4"]) return @"iPad Air 2";
if ([platform isEqualToString:@"iPad6,3"]) return @"iPad Pro (9.7-inch)";
if ([platform isEqualToString:@"iPad6,4"]) return @"iPad Pro (9.7-inch)";
if ([platform isEqualToString:@"iPad6,7"]) return @"iPad Pro (12.9-inch)";
if ([platform isEqualToString:@"iPad6,8"]) return @"iPad Pro (12.9-inch)";
if ([platform isEqualToString:@"iPad6,11"]) return @"iPad 5";
if ([platform isEqualToString:@"iPad6,12"]) return @"iPad 5";
if ([platform isEqualToString:@"iPad7,1"]) return @"iPad Pro 2(12.9-inch)";
if ([platform isEqualToString:@"iPad7,2"]) return @"iPad Pro 2(12.9-inch)";
if ([platform isEqualToString:@"iPad7,3"]) return @"iPad Pro (10.5-inch)";
if ([platform isEqualToString:@"iPad7,4"]) return @"iPad Pro (10.5-inch)";
if ([platform isEqualToString:@"iPad7,5"]) return @"iPad 6";
if ([platform isEqualToString:@"iPad7,6"]) return @"iPad 6";
if ([platform isEqualToString:@"iPad7,11"]) return @"iPad 7";
if ([platform isEqualToString:@"iPad7,12"]) return @"iPad 7";
if ([platform isEqualToString:@"iPad8,1"]) return @"iPad Pro (11-inch) ";
if ([platform isEqualToString:@"iPad8,2"]) return @"iPad Pro (11-inch) ";
if ([platform isEqualToString:@"iPad8,3"]) return @"iPad Pro (11-inch) ";
if ([platform isEqualToString:@"iPad8,4"]) return @"iPad Pro (11-inch) ";
if ([platform isEqualToString:@"iPad8,5"]) return @"iPad Pro 3 (12.9-inch) ";
if ([platform isEqualToString:@"iPad8,6"]) return @"iPad Pro 3 (12.9-inch) ";
if ([platform isEqualToString:@"iPad8,7"]) return @"iPad Pro 3 (12.9-inch) ";
if ([platform isEqualToString:@"iPad8,8"]) return @"iPad Pro 3 (12.9-inch) ";
if ([platform isEqualToString:@"iPad8,9"]) return @"iPad 11-inch 2";
if ([platform isEqualToString:@"iPad8,10"]) return @"iPad 11-inch 2";
if ([platform isEqualToString:@"iPad8,11"]) return @"iPad Pro 12.9-inch 4";
if ([platform isEqualToString:@"iPad8,12"]) return @"iPad Pro 12.9-inch 4";
if ([platform isEqualToString:@"iPad11,1"]) return @"iPad mini 5";
if ([platform isEqualToString:@"iPad11,2"]) return @"iPad mini 5";
if ([platform isEqualToString:@"iPad11,3"]) return @"iPad Air 3";
if ([platform isEqualToString:@"iPad11,4"]) return @"iPad Air 3";
if ([platform isEqualToString:@"iPad11,6"]) return @"iPad 8";
if ([platform isEqualToString:@"iPad11,7"]) return @"iPad 8";
if ([platform isEqualToString:@"iPad12,1"]) return @"iPad 9";
if ([platform isEqualToString:@"iPad12,2"]) return @"iPad 9";
if ([platform isEqualToString:@"iPad13,1"]) return @"iPad Air 4";
if ([platform isEqualToString:@"iPad13,2"]) return @"iPad Air 4";
if ([platform isEqualToString:@"iPad13,4"]) return @"iPad Pro 11-inch 3nd gen";
if ([platform isEqualToString:@"iPad13,5"]) return @"iPad Pro 11-inch 3nd gen";
if ([platform isEqualToString:@"iPad13,6"]) return @"iPad Pro 11-inch 3nd gen";
if ([platform isEqualToString:@"iPad13,7"]) return @"iPad Pro 11-inch 3nd gen";
if ([platform isEqualToString:@"iPad13,8"]) return @"iPad Pro 12.9-inch 5th gen";
if ([platform isEqualToString:@"iPad13,9"]) return @"iPad Pro 12.9-inch 5th gen";
if ([platform isEqualToString:@"iPad13,10"]) return @"iPad Pro 12.9-inch 5th gen";
if ([platform isEqualToString:@"iPad13,11"]) return @"iPad Pro 12.9-inch 5th gen";
if ([platform isEqualToString:@"iPad13,16"]) return @"iPad Air 5";
if ([platform isEqualToString:@"iPad13,17"]) return @"iPad Air 5";
if ([platform isEqualToString:@"iPad14,1"]) return @"iPad Mini 6";
if ([platform isEqualToString:@"iPad14,2"]) return @"iPad Mini 6";
// 其他
if ([platform isEqualToString:@"i386"]) return @"Apple Simulator";
if ([platform isEqualToString:@"x86_64"]) return @"Apple Simulator";
return platform;
}