From d7d3126f82579ef73c3ba8a1953e19dc5ffdd437 Mon Sep 17 00:00:00 2001 From: adam1929 <103995671+adam1929@users.noreply.github.com> Date: Wed, 26 Jun 2024 09:52:50 +0200 Subject: [PATCH] Updates iPhone & iPad device model names --- .../Classes/Models/DeviceProperties.swift | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/ExponeaSDK/ExponeaSDK/Classes/Models/DeviceProperties.swift b/ExponeaSDK/ExponeaSDK/Classes/Models/DeviceProperties.swift index 89df0a3e..13c4a470 100644 --- a/ExponeaSDK/ExponeaSDK/Classes/Models/DeviceProperties.swift +++ b/ExponeaSDK/ExponeaSDK/Classes/Models/DeviceProperties.swift @@ -69,7 +69,7 @@ public extension UIDevice { func mapToDevice(identifier: String) -> String { switch identifier { - // source of truth: https://www.theiphonewiki.com/wiki/List_of_iPhones + // source of truth: https://theapplewiki.com/wiki/List_of_iPhones case "iPhone1,1": return "iPhone" case "iPhone1,2": return "iPhone 3G" case "iPhone2,1": return "iPhone 3GS" @@ -108,7 +108,11 @@ public extension UIDevice { case "iPhone14,8": return "iPhone 14 Plus" case "iPhone15,2": return "iPhone 14 Pro" case "iPhone15,3": return "iPhone 14 Pro Max" - // source of truth: https://www.theiphonewiki.com/wiki/List_of_iPads + case "iPhone15,4": return "iPhone 15" + case "iPhone15,5": return "iPhone 15 Plus" + case "iPhone16,1": return "iPhone 15 Pro" + case "iPhone16,2": return "iPhone 15 Pro Max" + // source of truth: https://theapplewiki.com/wiki/List_of_iPads case "iPad1,1": return "iPad" case "iPad2,1", "iPad2,2", "iPad2,3", "iPad2,4": return "iPad (2nd generation)" case "iPad3,1", "iPad3,2", "iPad3,3": return "iPad (3rd generation)" @@ -119,20 +123,22 @@ public extension UIDevice { case "iPad11,6", "iPad11,7": return "iPad (8th generation)" case "iPad12,1", "iPad12,2": return "iPad (9th generation)" case "iPad13,18", "iPad13,19": return "iPad (10th generation)" - // source of truth: https://www.theiphonewiki.com/wiki/List_of_iPad_Airs + // source of truth: https://theapplewiki.com/wiki/List_of_iPad_Airs case "iPad4,1", "iPad4,2", "iPad4,3": return "iPad Air" case "iPad5,3", "iPad5,4": return "iPad Air (2nd generation)" case "iPad11,3", "iPad11,4": return "iPad Air (3rd generation)" case "iPad13,1", "iPad13,2": return "iPad Air (4th generation)" case "iPad13,16", "iPad13,17": return "iPad Air (5th generation)" - // source of truth: https://www.theiphonewiki.com/wiki/List_of_iPad_minis + case "iPad14,8", "iPad14,9": return "iPad Air 11-inch (M2)" + case "iPad14,10", "iPad14,11": return "iPad Air 13-inch (M2)" + // source of truth: https://theapplewiki.com/wiki/List_of_iPad_minis case "iPad2,5", "iPad2,6", "iPad2,7": return "iPad mini" case "iPad4,4", "iPad4,5", "iPad4,6": return "iPad mini (2nd generation)" case "iPad4,7", "iPad4,8", "iPad4,9": return "iPad mini (3rd generation)" case "iPad5,1", "iPad5,2": return "iPad mini (4th generation)" case "iPad11,1", "iPad11,2": return "iPad mini (5th generation)" case "iPad14,1", "iPad14,2": return "iPad mini (6th generation)" - // source of truth: https://www.theiphonewiki.com/wiki/List_of_iPad_Pros + // source of truth: https://theapplewiki.com/wiki/List_of_iPad_Pros case "iPad6,3", "iPad6,4": return "iPad Pro (9.7-inch)" case "iPad7,3", "iPad7,4": return "iPad Pro (10.5-inch)" case "iPad8,1", "iPad8,2", "iPad8,3", "iPad8,4": return "iPad Pro (11-inch)" @@ -143,6 +149,10 @@ public extension UIDevice { case "iPad8,5", "iPad8,6", "iPad8,7", "iPad8,8": return "iPad Pro (12.9-inch) (3rd generation)" case "iPad8,11", "iPad8,12": return "iPad Pro (12.9-inch) (4th generation)" case "iPad13,8", "iPad13,9", "iPad13,10", "iPad13,11": return "iPad Pro (12.9-inch) (5th generation)" + case "iPad14,3", "iPad14,4": return "iPad Pro (11-inch) (4th generation)" + case "iPad14,5", "iPad14,6": return "iPad Pro (12.9-inch) (6th generation)" + case "iPad16,3", "iPad16,4": return "iPad Pro 11-inch (M4)" + case "iPad16,5", "iPad16,6": return "iPad Pro 13-inch (M4)" // simulator case "i386", "x86_64": return getSimulatorModelName(identifier: identifier) default: return UIDevice.current.model