1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
| - (NSString *)modelName { NSString *machine = [MLBUtilities deviceModel]; if ([machine isEqualToString:@"iPod5,1"]) { return @"iPod Touch 5"; } else if ([machine isEqualToString:@"iPod7,1"]) { return @"iPod Touch 6"; } else if ([machine isEqualToString:@"iPhone3,1"] || [machine isEqualToString:@"iPhone3,2"] || [machine isEqualToString:@"iPhone3,3"]) { return @"iPhone 4"; } else if ([machine isEqualToString:@"iPhone4,1"]) { return @"iPhone 4s"; } else if ([machine isEqualToString:@"iPhone5,1"] || [machine isEqualToString:@"iPhone5,2"]) { return @"iPhone 5"; } else if ([machine isEqualToString:@"iPhone5,3"] || [machine isEqualToString:@"iPhone5,4"]) { return @"iPhone 5c"; } else if ([machine isEqualToString:@"iPhone6,1"] || [machine isEqualToString:@"iPhone6,2"]) { return @"iPhone 5s"; } else if ([machine isEqualToString:@"iPhone7,2"]) { return @"iPhone 6"; } else if ([machine isEqualToString:@"iPhone7,1"]) { return @"iPhone 6 Plus"; } else if ([machine isEqualToString:@"iPhone8,1"]) { return @"iPhone 6s"; } else if ([machine isEqualToString:@"iPhone8,2"]) { return @"iPhone 6s Plus"; } else if ([machine isEqualToString:@"iPhone8,4"]) { return @"iPhone SE"; } else if ([machine isEqualToString:@"iPhone9,1"] || [machine isEqualToString:@"iPhone9,3"]) { return @"iPhone 7"; } else if ([machine isEqualToString:@"iPhone9,2"] || [machine isEqualToString:@"iPhone9,4"]) { return @"iPhone 7 Plus"; } else if ([machine isEqualToString:@"iPhone10,1"] || [machine isEqualToString:@"iPhone10,4"]) { return @"iPhone 8"; } else if ([machine isEqualToString:@"iPhone10,2"] || [machine isEqualToString:@"iPhone10,5"]) { return @"iPhone 8 Plus"; } else if ([machine isEqualToString:@"iPhone10,3"] || [machine isEqualToString:@"iPhone10,6"]) { return @"iPhone X"; } else if ([machine isEqualToString:@"iPad2,1"] || [machine isEqualToString:@"iPad2,2"] || [machine isEqualToString:@"iPad2,3"] || [machine isEqualToString:@"iPad2,4"]) { return @"iPad 2"; } else if ([machine isEqualToString:@"iPad3,1"] || [machine isEqualToString:@"iPad3,2"] || [machine isEqualToString:@"iPad3,3"]) { return @"iPad 3"; } else if ([machine isEqualToString:@"iPad3,4"] || [machine isEqualToString:@"iPad3,5"] || [machine isEqualToString:@"iPad3,6"]) { return @"iPad 4"; } else if ([machine isEqualToString:@"iPad4,1"] || [machine isEqualToString:@"iPad4,2"] || [machine isEqualToString:@"iPad4,3"]) { return @"iPad Air"; } else if ([machine isEqualToString:@"iPad5,3"] || [machine isEqualToString:@"iPad5,4"]) { return @"iPad Air 2"; } else if ([machine isEqualToString:@"iPad6,11"] || [machine isEqualToString:@"iPad6,12"]) { return @"iPad 5"; } else if ([machine isEqualToString:@"iPad2,5"] || [machine isEqualToString:@"iPad2,6"] || [machine isEqualToString:@"iPad2,7"]) { return @"iPad Mini"; } else if ([machine isEqualToString:@"iPad4,4"] || [machine isEqualToString:@"iPad4,5"] || [machine isEqualToString:@"iPad4,6"]) { return @"iPad Mini 2"; } else if ([machine isEqualToString:@"iPad4,7"] || [machine isEqualToString:@"iPad4,8"] || [machine isEqualToString:@"iPad4,9"]) { return @"iPad Mini 3"; } else if ([machine isEqualToString:@"iPad5,1"] || [machine isEqualToString:@"iPad5,2"]) { return @"iPad Mini 4"; } else if ([machine isEqualToString:@"iPad6,3"] || [machine isEqualToString:@"iPad6,4"]) { return @"iPad Pro 9.7 Inch"; } else if ([machine isEqualToString:@"iPad6,7"] || [machine isEqualToString:@"iPad6,8"]) { return @"iPad Pro 12.9 Inch"; } else if ([machine isEqualToString:@"iPad7,1"] || [machine isEqualToString:@"iPad7,2"]) { return @"iPad Pro 12.9 Inch 2. Generation"; } else if ([machine isEqualToString:@"iPad7,3"] || [machine isEqualToString:@"iPad7,4"]) { return @"iPad Pro 10.5 Inch"; } else if ([machine isEqualToString:@"AppleTV5,3"]) { return @"Apple TV"; } else if ([machine isEqualToString:@"i386"] || [machine isEqualToString:@"x86_64"]) { return [NSString stringWithFormat:@"%@-Simulator", self.localizedModel]; } else { return machine; } }
|