From aeaff75e6b955107f0542c98c21939219813c167 Mon Sep 17 00:00:00 2001 From: shiguoliang Date: Tue, 16 Jul 2024 13:09:22 +0800 Subject: [PATCH 1/2] Add Air 6,7 and iPad Pro 5,7 --- GBDeviceInfo.podspec | 2 +- GBDeviceInfo/GBDeviceInfoTypes_iOS.h | 4 ++++ GBDeviceInfo/GBDeviceInfo_iOS.m | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/GBDeviceInfo.podspec b/GBDeviceInfo.podspec index d91deef..81bec6c 100644 --- a/GBDeviceInfo.podspec +++ b/GBDeviceInfo.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'GBDeviceInfo' - s.version = '7.2.0' + s.version = '7.3.0' s.summary = 'Detects the hardware, software and display of the current iOS or Mac OS X device at runtime.' s.author = 'Luka Mirosevic' s.homepage = 'https://github.com/lmirosevic/GBDeviceInfo' diff --git a/GBDeviceInfo/GBDeviceInfoTypes_iOS.h b/GBDeviceInfo/GBDeviceInfoTypes_iOS.h index 329cb9e..ff0a5ec 100644 --- a/GBDeviceInfo/GBDeviceInfoTypes_iOS.h +++ b/GBDeviceInfo/GBDeviceInfoTypes_iOS.h @@ -96,6 +96,10 @@ typedef NS_ENUM(NSInteger, GBDeviceModel) { GBDeviceModeliPadPro12p9Inch5, GBDeviceModeliPadPro11Inch4, GBDeviceModeliPadPro12p9Inch6, + GBDeviceModeliPadAir6, + GBDeviceModeliPadAir7, + GBDeviceModeliPadPro11Inch5, + GBDeviceModeliPadPro12p9Inch7, GBDeviceModeliPod1, GBDeviceModeliPod2, GBDeviceModeliPod3, diff --git a/GBDeviceInfo/GBDeviceInfo_iOS.m b/GBDeviceInfo/GBDeviceInfo_iOS.m index 50a3f83..8107621 100644 --- a/GBDeviceInfo/GBDeviceInfo_iOS.m +++ b/GBDeviceInfo/GBDeviceInfo_iOS.m @@ -454,6 +454,23 @@ + (NSArray *)_modelNuances { // iPad Pro 6th Gen 12.9-inch, 2022 @[@14, @5]: @[@(GBDeviceModeliPadPro12p9Inch6), @"iPad Pro 6th Gen (12.9 inch, WiFi)", @(GBDeviceDisplay12p9Inch), @264], @[@14, @6]: @[@(GBDeviceModeliPadPro12p9Inch6), @"iPad Pro 6th Gen (12.9 inch, WiFi+Cellular)", @(GBDeviceDisplay12p9Inch), @264], + + // Air 6, 2024 + @[@14, @8]: @[@(GBDeviceModeliPadAir6), @"iPad Air 6th Gen (WiFi)", @(GBDeviceDisplay10p9Inch), @264], + @[@14, @9]: @[@(GBDeviceModeliPadAir6), @"iPad Air 6th Gen (WiFi+Cellular)", @(GBDeviceDisplay10p9Inch), @264], + + // Air 7, 2024 + @[@14, @10]: @[@(GBDeviceModeliPadAir7), @"iPad Air 7th Gen (WiFi)", @(GBDeviceDisplay10p9Inch), @264], + @[@14, @11]: @[@(GBDeviceModeliPadAir7), @"iPad Air 7th Gen (WiFi+Cellular)", @(GBDeviceDisplay10p9Inch), @264], + + // iPad Pro 5th Gen 11-inch, 2024 + @[@16, @3]: @[@(GBDeviceModeliPadPro11Inch5), @"iPad Pro 5th Gen (11 inch, WiFi)", @(GBDeviceDisplay11Inch), @264], + @[@16, @4]: @[@(GBDeviceModeliPadPro11Inch5), @"iPad Pro 5th Gen (11 inch, WiFi+Cellular)", @(GBDeviceDisplay11Inch), @264], + + // iPad Pro 7th Gen 12.9-inch, 2024 + @[@16, @5]: @[@(GBDeviceModeliPadPro12p9Inch7), @"iPad Pro 7th Gen (12.9 inch, WiFi)", @(GBDeviceDisplay12p9Inch), @264], + @[@16, @6]: @[@(GBDeviceModeliPadPro12p9Inch7), @"iPad Pro 7th Gen (12.9 inch, WiFi+Cellular)", @(GBDeviceDisplay12p9Inch), @264], + }, @"iPod": @{ // 1st Gen From b4c32876fcfbbc3f8ee5bbe80fa9dec82cac3114 Mon Sep 17 00:00:00 2001 From: shiguoliang Date: Tue, 24 Sep 2024 09:14:46 +0800 Subject: [PATCH 2/2] feat: support iPhone 16 series --- GBDeviceInfo.podspec | 2 +- GBDeviceInfo/GBDeviceInfoTypes_iOS.h | 4 ++++ GBDeviceInfo/GBDeviceInfo_iOS.m | 12 ++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/GBDeviceInfo.podspec b/GBDeviceInfo.podspec index 81bec6c..33b1829 100644 --- a/GBDeviceInfo.podspec +++ b/GBDeviceInfo.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'GBDeviceInfo' - s.version = '7.3.0' + s.version = '7.4.0' s.summary = 'Detects the hardware, software and display of the current iOS or Mac OS X device at runtime.' s.author = 'Luka Mirosevic' s.homepage = 'https://github.com/lmirosevic/GBDeviceInfo' diff --git a/GBDeviceInfo/GBDeviceInfoTypes_iOS.h b/GBDeviceInfo/GBDeviceInfoTypes_iOS.h index ff0a5ec..1c96833 100644 --- a/GBDeviceInfo/GBDeviceInfoTypes_iOS.h +++ b/GBDeviceInfo/GBDeviceInfoTypes_iOS.h @@ -63,6 +63,10 @@ typedef NS_ENUM(NSInteger, GBDeviceModel) { GBDeviceModeliPhone15Plus, GBDeviceModeliPhone15Pro, GBDeviceModeliPhone15ProMax, + GBDeviceModeliPhone16Pro, + GBDeviceModeliPhone16ProMax, + GBDeviceModeliPhone16, + GBDeviceModeliPhone16Plus, GBDeviceModeliPad1, GBDeviceModeliPad2, GBDeviceModeliPad3, diff --git a/GBDeviceInfo/GBDeviceInfo_iOS.m b/GBDeviceInfo/GBDeviceInfo_iOS.m index 8107621..a640a1d 100644 --- a/GBDeviceInfo/GBDeviceInfo_iOS.m +++ b/GBDeviceInfo/GBDeviceInfo_iOS.m @@ -290,6 +290,18 @@ + (NSArray *)_modelNuances { // 15 Pro Max @[@16, @2]: @[@(GBDeviceModeliPhone15ProMax), @"iPhone 15 Pro Max", @(GBDeviceDisplay6p7Inch), @460], + + // 16 Pro + @[@17, @1]: @[@(GBDeviceModeliPhone16Pro), @"iPhone 16 Pro", @(GBDeviceDisplay6p1Inch), @460], + + // 16 Pro Max + @[@17, @2]: @[@(GBDeviceModeliPhone16ProMax), @"iPhone 16 Pro Max", @(GBDeviceDisplay6p7Inch), @460], + + // 16 + @[@17, @3]: @[@(GBDeviceModeliPhone16), @"iPhone 16", @(GBDeviceDisplay6p1Inch), @460], + + // 16 Plus + @[@17, @4]: @[@(GBDeviceModeliPhone16Plus), @"iPhone 16 Plus", @(GBDeviceDisplay6p7Inch), @460], }, @"iPad": @{ // 1