Name (iPhone) |
Model Identifier |
iPhone |
iPhone1,1 |
iPhone 3G |
iPhone1,2 |
iPhone 3GS |
iPhone2,1 |
iPhone 4 (GSM) |
iPhone3,1 iPhone3,2 |
iPhone 4 (CDMA) |
iPhone3,3 |
iPhone 4s |
iPhone4,1 |
iPhone 5 (GSM North America) |
iPhone5,1 |
iPhone 5 (GSM International) |
iPhone5,1 |
iPhone 5 (GSM and CDMA) |
iPhone5,2 |
iPhone 5 (China) |
iPhone5,2 |
iPhone 5c |
iPhone5,3 (GSM/CDMA) iPhone5,4 (CDMA) |
iPhone 5s |
iPhone6,1 (GSM) iPhone6,2 (GSM/CDMA) |
iPhone 6 |
iPhone7,2 |
iPhone 6 Plus |
iPhone7,1 |
iPhone 6s |
iPhone8,1 |
iPhone 6s Plus |
iPhone8,2 |
iPhone SE |
iPhone8,4 |
iPhone 7 |
iPhone9,1 iPhone9,3 |
iPhone 7 Plus |
iPhone9,2 iPhone9,4 |
iPhone 8 |
iPhone10,1 iPhone10,4 |
iPhone 8 Plus |
iPhone10,2 iPhone10,5 |
iPhone X |
iPhone10,3 iPhone10,6 |
iPhone XS |
iPhone11,2 |
iPhone XS Max |
iPhone11,6 |
iPhone XR |
iPhone11,8 |
iPhone 11 |
iPhone12,1 |
iPhone 11 Pro |
iPhone12,3 |
iPhone 11 Pro Max |
iPhone12,5 |
iPhone SE (2nd generation) |
iPhone12,8 |
Name(touch) |
Model Identifier |
iPod touch |
iPod1,1 |
iPod touch (2nd generation) |
iPod2,1 |
iPod touch (3rd generation) |
iPod3,1 |
iPod touch (4th generation) |
iPod4,1 |
iPod touch (5th generation) |
iPod5,1 |
iPod touch (5th generation, Mid 2013) |
iPod5,1 |
iPod touch (6th generation) |
iPod7,1 |
iPod touch (7th generation) |
iPod9,1 |
Name(iPad) |
Model Identifier |
iPad (Wi-Fi) |
iPad1,1 |
iPad (Wi-Fi + 3G) |
iPad1,1 |
iPad 2 (Wi-Fi) |
iPad2,1 iPad2,4 |
iPad 2 (Wi-Fi + 3G GSM) |
iPad2,2 |
iPad 2 (Wi-Fi + 3G CDMA) |
iPad2,3 |
iPad (3rd generation) (Wi-Fi) |
iPad3,1 |
iPad (3rd generation) (Wi-Fi + Cellular) |
iPad3,3 |
iPad (3rd generation) (Wi-Fi + Cellular Version) |
iPad3,2 |
iPad (4th generation) (Wi-Fi) |
iPad3,4 |
iPad (4th generation) (Wi-Fi + Cellular) |
iPad3,5 |
iPad (4th generation) (Wi-Fi + Cellular MM) |
iPad3,6 |
iPad mini (Wi-Fi) |
iPad2,5 |
iPad mini (Wi-Fi + Cellular) |
iPad2,6 |
iPad mini (Wi-Fi + Cellular MM) |
iPad2,7 |
iPad Air (Wi-Fi) |
iPad4,1 |
iPad Air (Wi-Fi + Cellular) |
iPad4,2 |
iPad mini 2 (Wi-Fi) |
iPad4,4 |
iPad mini 2 (Wi-Fi + Cellular) |
iPad4,5 |
iPad Air 2 (Wi-Fi) |
iPad5,3 |
iPad Air 2 (Wi-Fi + Cellular) |
iPad5,4 |
iPad mini 3 (Wi-Fi) |
iPad4,7 |
iPad mini 3 (Wi-Fi + Cellular) |
iPad4,8 |
iPad mini 4 (Wi-Fi) |
iPad5,1 |
iPad mini 4 (Wi-Fi + Cellular) |
iPad5,2 |
iPad Pro (12.9-inch) (Wi-Fi) |
iPad6,7 |
iPad Pro (12.9-inch) (Wi-Fi + Cellular) |
iPad6,8 |
iPad Pro (9.7-inch) (Wi-Fi) |
iPad6,3 |
iPad Pro (9.7-inch) (Wi-Fi + Cellular) |
iPad6,4 |
iPad (5th generation) (Wi-Fi) |
iPad6,11 |
iPad (5th generation) (Wi-Fi + Cellular) |
iPad6,12 |
iPad Pro (10.5-inch) (Wi-Fi) |
iPad7,3 |
iPad Pro (10.5-inch) (Wi-Fi + Cellular) |
iPad7,4 |
iPad Pro (12.9-inch) (2nd generation) (Wi-Fi) |
iPad7,1 |
iPad Pro (12.9-inch) (2nd generation) (Wi-Fi + Cellular) |
iPad7,2 |
iPad (6th generation) (Wi-Fi) |
iPad7,5 |
iPad (6th generation) (Wi-Fi + Cellular) |
iPad7,6 |
iPad Pro (11-inch) (Wi-Fi) |
iPad8,1 (64, 256, 512 GB) iPad8,2 (1 TB) |
iPad Pro (11-inch) (Wi-Fi + Cellular) |
iPad8,3 (64, 256, 512 GB) iPad8,4 (1 TB) |
iPad Pro (12.9-inch) (3nd generation) (Wi-Fi) |
iPad8,5 (64, 256, 512 GB) iPad8,6 (1 TB) |
iPad Pro (12.9-inch) (3nd generation) (Wi-Fi + Cellular) |
iPad8,7 (64, 256, 512 GB) iPad8,8 (1 TB) |
iPad Air (3rd generation) (Wi-Fi) |
iPad11,3 |
iPad Air (3rd generation) (Wi-Fi + Cellular) |
iPad11,4 |
iPad mini (3th generation) (Wi-Fi) |
iPad11,1 |
iPad mini (3th generation) (Wi-Fi + Cellular) |
iPad11,2 |
iPad (7th generation) (Wi-Fi) |
iPad7,11 |
iPad (7th generation) (Wi-Fi + Cellular) |
iPad7,12 |
iPad Pro 11-inch (2nd generation) (Wi-Fi) |
iPad8,9 |
iPad Pro 11-inch (2nd generation) (Wi-Fi + Cellular) |
iPad8,10 |
iPad Pro (12.9-inch) (4nd generation) (Wi-Fi) |
iPad8,11 |
iPad Pro (12.9-inch) (4nd generation) (Wi-Fi + Cellular) |
iPad8,12 |
注:获取到i386与x86_64时为Simulator(模拟器)
获取方式
#import "sys/utsname.h"
- (NSString *)getModelIndentifier {
struct utsname systemInfo;
uname(&systemInfo);
NSString *modelIndentifier = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];
if ([modelIndentifier isEqualToString:@"i386"] || [modelIndentifier isEqualToString:@"x86_64"]) {
return @"Simulator";
} else {
return modelIndentifier;
}
}