2023年12月18日发(作者:恭翠梅)
if ([platform isEqualToString:@"iPod5,1"]) return @"iPod_Touch_5"; if ([platform isEqualToString:@"iPod7,1"]) return @"iPod_Touch_6"; // iPad if ([platform isEqualToString:@"iPad1,1"]) return @"iPad"; if ([platform isEqualToString:@"iPad2,1"]) return @"iPad_2 (WiFi)"; if ([platform isEqualToString:@"iPad2,2"]) return @"iPad_2 (GSM)"; if ([platform isEqualToString:@"iPad2,3"]) return @"iPad_2 (CDMA)"; if ([platform isEqualToString:@"iPad2,4"]) return @"iPad_2"; 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 (WiFi)"; if ([platform isEqualToString:@"iPad3,5"]) return @"iPad_4"; if ([platform isEqualToString:@"iPad3,6"]) return @"iPad_4"; if ([platform isEqualToString:@"iPad6,11"]) return @"iPad_5"; if ([platform isEqualToString:@"iPad6,12"]) return @"iPad_5"; if ([platform isEqualToString:@"iPad7,5"]) return @"iPad_6"; if ([platform isEqualToString:@"iPad7,6"]) return @"iPad_6"; // iPad_Air 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:@"iPad5,3"]) return @"iPad_Air_2"; if ([platform isEqualToString:@"iPad5,4"]) return @"iPad_Air_2"; // iPad_mini if ([platform isEqualToString:@"iPad2,5"]) return @"iPad_mini"; if ([platform isEqualToString:@"iPad2,6"]) return @"iPad_mini"; if ([platform isEqualToString:@"iPad2,7"]) return @"iPad_mini"; // iPad_mini 2 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"; // iPad_mini 3 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"; // iPad_mini 4 if ([platform isEqualToString:@"iPad5,1"]) return @"iPad_mini_4"; if ([platform isEqualToString:@"iPad5,2"]) return @"iPad_mini_4"; // iPad_Pro(9.7) if ([platform isEqualToString:@"iPad6,3"]) return @"iPad_Pro(9.7)"; if ([platform isEqualToString:@"iPad6,4"]) return @"iPad_Pro(9.7)"; // iPad_Pro(10.5) if ([platform isEqualToString:@"iPad7,3"]) return @"iPad_Pro(10.5)"; if ([platform isEqualToString:@"iPad7,4"]) return @"iPad_Pro(10.5)"; // iPad_Pro(11) if ([platform isEqualToString:@"iPad8,1"]) return @"iPad_Pro(11)"; if ([platform isEqualToString:@"iPad8,2"]) return @"iPad_Pro(11)"; if ([platform isEqualToString:@"iPad8,3"]) return @"iPad_Pro(11)"; if ([platform isEqualToString:@"iPad8,4"]) return @"iPad_Pro(11)"; // iPad_Pro(12.9) if ([platform isEqualToString:@"iPad6,7"]) return @"iPad_Pro(12.9)"; if ([platform isEqualToString:@"iPad6,8"]) return @"iPad_Pro(12.9)"; // iPad_Pro_2(12.9) if ([platform isEqualToString:@"iPad7,1"]) return @"iPad_Pro_2(12.9)"; if ([platform isEqualToString:@"iPad7,2"]) return @"iPad_Pro_2(12.9)"; // iPad_Pro_3(12.9) if ([platform isEqualToString:@"iPad8,5"]) return @"iPad_Pro_3(12.9)"; if ([platform isEqualToString:@"iPad8,6"]) return @"iPad_Pro_3(12.9)"; if ([platform isEqualToString:@"iPad8,7"]) return @"iPad_Pro_3(12.9)"; if ([platform isEqualToString:@"iPad8,8"]) return @"iPad_Pro_3(12.9)"; // 模拟器 if ([platform isEqualToString:@"i386"]) return @"Simulator_i386"; if ([platform isEqualToString:@"x86_64"]) return @"Simulator_x86_64";
DLog(@"NOTE: Unknown device type: %@", platform);
return [UIDevice currentDevice].model;}
2023年12月18日发(作者:恭翠梅)
if ([platform isEqualToString:@"iPod5,1"]) return @"iPod_Touch_5"; if ([platform isEqualToString:@"iPod7,1"]) return @"iPod_Touch_6"; // iPad if ([platform isEqualToString:@"iPad1,1"]) return @"iPad"; if ([platform isEqualToString:@"iPad2,1"]) return @"iPad_2 (WiFi)"; if ([platform isEqualToString:@"iPad2,2"]) return @"iPad_2 (GSM)"; if ([platform isEqualToString:@"iPad2,3"]) return @"iPad_2 (CDMA)"; if ([platform isEqualToString:@"iPad2,4"]) return @"iPad_2"; 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 (WiFi)"; if ([platform isEqualToString:@"iPad3,5"]) return @"iPad_4"; if ([platform isEqualToString:@"iPad3,6"]) return @"iPad_4"; if ([platform isEqualToString:@"iPad6,11"]) return @"iPad_5"; if ([platform isEqualToString:@"iPad6,12"]) return @"iPad_5"; if ([platform isEqualToString:@"iPad7,5"]) return @"iPad_6"; if ([platform isEqualToString:@"iPad7,6"]) return @"iPad_6"; // iPad_Air 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:@"iPad5,3"]) return @"iPad_Air_2"; if ([platform isEqualToString:@"iPad5,4"]) return @"iPad_Air_2"; // iPad_mini if ([platform isEqualToString:@"iPad2,5"]) return @"iPad_mini"; if ([platform isEqualToString:@"iPad2,6"]) return @"iPad_mini"; if ([platform isEqualToString:@"iPad2,7"]) return @"iPad_mini"; // iPad_mini 2 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"; // iPad_mini 3 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"; // iPad_mini 4 if ([platform isEqualToString:@"iPad5,1"]) return @"iPad_mini_4"; if ([platform isEqualToString:@"iPad5,2"]) return @"iPad_mini_4"; // iPad_Pro(9.7) if ([platform isEqualToString:@"iPad6,3"]) return @"iPad_Pro(9.7)"; if ([platform isEqualToString:@"iPad6,4"]) return @"iPad_Pro(9.7)"; // iPad_Pro(10.5) if ([platform isEqualToString:@"iPad7,3"]) return @"iPad_Pro(10.5)"; if ([platform isEqualToString:@"iPad7,4"]) return @"iPad_Pro(10.5)"; // iPad_Pro(11) if ([platform isEqualToString:@"iPad8,1"]) return @"iPad_Pro(11)"; if ([platform isEqualToString:@"iPad8,2"]) return @"iPad_Pro(11)"; if ([platform isEqualToString:@"iPad8,3"]) return @"iPad_Pro(11)"; if ([platform isEqualToString:@"iPad8,4"]) return @"iPad_Pro(11)"; // iPad_Pro(12.9) if ([platform isEqualToString:@"iPad6,7"]) return @"iPad_Pro(12.9)"; if ([platform isEqualToString:@"iPad6,8"]) return @"iPad_Pro(12.9)"; // iPad_Pro_2(12.9) if ([platform isEqualToString:@"iPad7,1"]) return @"iPad_Pro_2(12.9)"; if ([platform isEqualToString:@"iPad7,2"]) return @"iPad_Pro_2(12.9)"; // iPad_Pro_3(12.9) if ([platform isEqualToString:@"iPad8,5"]) return @"iPad_Pro_3(12.9)"; if ([platform isEqualToString:@"iPad8,6"]) return @"iPad_Pro_3(12.9)"; if ([platform isEqualToString:@"iPad8,7"]) return @"iPad_Pro_3(12.9)"; if ([platform isEqualToString:@"iPad8,8"]) return @"iPad_Pro_3(12.9)"; // 模拟器 if ([platform isEqualToString:@"i386"]) return @"Simulator_i386"; if ([platform isEqualToString:@"x86_64"]) return @"Simulator_x86_64";
DLog(@"NOTE: Unknown device type: %@", platform);
return [UIDevice currentDevice].model;}