Apple Device Model list

Get Device Model

#import 

// Get device model
+ (NSString *)getDeviceModel {
    struct utsname systemInfo;
    uname(&systemInfo);
    return [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];
}

获取device model后,可根据列表中对应关系判断设备的型号

iPhone

"iPhone3,1", "iPhone3,2", "iPhone3,3":             iPhone 4
"iPhone4,1", "iPhone4,2", "iPhone4,3":             iPhone 4S
"iPhone5,1", "iPhone5,2":                          iPhone 5
"iPhone5,3", "iPhone5,4":                          iPhone 5C
"iPhone6,1", "iPhone6,2":                          iPhone 5S
"iPhone7,2":                                       iPhone 6
"iPhone7,1":                                       iPhone 6 Plus
"iPhone8,1":                                       iPhone 6S
"iPhone8,2":                                       iPhone 6S Plus
"iPhone8,4":                                       iPhone SE
"iPhone9,1", "iPhone9,3":                          iPhone 7
"iPhone9,2", "iPhone9,4":                          iPhone 7 Plus
"iPhone10,1", "iPhone10,4":                        iPhone 8
"iPhone10,2", "iPhone10,5":                        iPhone 8 Plus
"iPhone10,3", "iPhone10,6":                        iPhone X
"iPhone11,2":                                      iPhone Xs
"iPhone11,4", "iPhone11,6":                        iPhone Xs Max
"iPhone11,8":                                      iPhone Xʀ

iPad

"iPad1,1":                                         iPad 1
"iPad2,1", "iPad2,2", "iPad2,3", "iPad2,4":        iPad 2
"iPad3,1", "iPad3,2", "iPad3,3":                   iPad 3
"iPad3,4", "iPad3,5", "iPad3,6":                   iPad 4
"iPad6,11", "iPad6,12":                            iPad 5
"iPad7,5", "iPad7,6":                              iPad 6
"iPad4,1", "iPad4,2", "iPad4,3":                   iPad Air
"iPad5,3", "iPad5,4":                              iPad Air 2
"iPad2,5", "iPad2,6", "iPad2,7":                   iPad Mini
"iPad4,4", "iPad4,5", "iPad4,6":                   iPad Mini 2
"iPad4,7", "iPad4,8", "iPad4,9":                   iPad Mini 3
"iPad5,1", "iPad5,2":                              iPad Mini 4
"iPad6,3", "iPad6,4":                              iPad Pro 9.7
"iPad6,7", "iPad6,8", "iPad7,1", "iPad7,2":        iPad Pro 12.9
"iPad7,3", "iPad7,4":                              iPad Pro 10.5

iPod

"iPod1,1":                                         iPod Touch 1
"iPod2,1":                                         iPod Touch 2
"iPod3,1":                                         iPod Touch 3
"iPod4,1":                                         iPod Touch 4
"iPod5,1":                                         iPod Touch 5
"iPod7,1":                                         iPod Touch 6

Apple TV

"AppleTV2,1":                                      Apple TV 2
"AppleTV3,1", "AppleTV3,2":                        Apple TV 3
"AppleTV5,3":                                      Apple TV 4
"AppleTV6,2":                                      Apple TV 4K

Apple Watch

"Watch1,1", "Watch1,2":                            Apple Watch
"Watch2,6", "Watch2,7":                            Apple Watch Series 1
"Watch2,3", "Watch2,4":                            Apple Watch Series 2
"Watch3,1", "Watch3,2", "Watch3,3", "Watch3,4":    Apple Watch Series 3
"Watch4,1", "Watch4,2", "Watch4,3", "Watch4,4":    Apple Watch Series 4

HomePod

"AudioAccessory1,1":                                HomePod

Simulator

"i386", "x86_64":                                  Simulator

扩展阅读

ios device models
Cooci: iOS 设备信息

你可能感兴趣的:(Apple Device Model list)