Last active
January 16, 2026 14:59
-
-
Save Jager-yoo/9e624515e6157fc2ad4b0b4a1556f7e3 to your computer and use it in GitHub Desktop.
How to get watchOS device model name, size, GPS/Cellular
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| enum WatchDevice { | |
| /// Apple Watch model name | |
| static let modelName: String = { | |
| let id = identifier | |
| return mapToName(identifier: id) | |
| }() | |
| /// Get current device identifier from the system (e.g., "Watch7,3") | |
| private static let identifier: String = { | |
| var systemInfo = utsname() | |
| uname(&systemInfo) | |
| return Mirror(reflecting: systemInfo.machine) | |
| .children | |
| .compactMap { elem -> String? in | |
| guard let v = elem.value as? Int8, v != 0 else { return nil } | |
| return String(UnicodeScalar(UInt8(v))) | |
| } | |
| .joined() | |
| }() | |
| /// Map identifier to a human‑readable name | |
| /// - Important: For updates, see: https://appledb.dev/device-selection/Apple-Watch.html | |
| private static func mapToName(identifier: String) -> String { | |
| switch identifier { | |
| // ───────── Series 3 | |
| case "Watch3,3": return "Apple Watch Series 3 38mm (GPS)" | |
| case "Watch3,1": return "Apple Watch Series 3 38mm (Cellular)" | |
| case "Watch3,4": return "Apple Watch Series 3 42mm (GPS)" | |
| case "Watch3,2": return "Apple Watch Series 3 42mm (Cellular)" | |
| // ───────── Series 4 | |
| case "Watch4,1": return "Apple Watch Series 4 40mm (GPS)" | |
| case "Watch4,3": return "Apple Watch Series 4 40mm (Cellular)" | |
| case "Watch4,2": return "Apple Watch Series 4 44mm (GPS)" | |
| case "Watch4,4": return "Apple Watch Series 4 44mm (Cellular)" | |
| // ───────── Series 5 | |
| case "Watch5,1": return "Apple Watch Series 5 40mm (GPS)" | |
| case "Watch5,3": return "Apple Watch Series 5 40mm (Cellular)" | |
| case "Watch5,2": return "Apple Watch Series 5 44mm (GPS)" | |
| case "Watch5,4": return "Apple Watch Series 5 44mm (Cellular)" | |
| // ───────── Series 6 | |
| case "Watch6,1": return "Apple Watch Series 6 40mm (GPS)" | |
| case "Watch6,3": return "Apple Watch Series 6 40mm (Cellular)" | |
| case "Watch6,2": return "Apple Watch Series 6 44mm (GPS)" | |
| case "Watch6,4": return "Apple Watch Series 6 44mm (Cellular)" | |
| // ───────── SE (1st) | |
| case "Watch5,9": return "Apple Watch SE 40mm (GPS)" | |
| case "Watch5,11": return "Apple Watch SE 40mm (Cellular)" | |
| case "Watch5,10": return "Apple Watch SE 44mm (GPS)" | |
| case "Watch5,12": return "Apple Watch SE 44mm (Cellular)" | |
| // ───────── Series 7 | |
| case "Watch6,6": return "Apple Watch Series 7 41mm (GPS)" | |
| case "Watch6,8": return "Apple Watch Series 7 41mm (Cellular)" | |
| case "Watch6,7": return "Apple Watch Series 7 45mm (GPS)" | |
| case "Watch6,9": return "Apple Watch Series 7 45mm (Cellular)" | |
| // ───────── Series 8 | |
| case "Watch6,14": return "Apple Watch Series 8 41mm (GPS)" | |
| case "Watch6,16": return "Apple Watch Series 8 41mm (Cellular)" | |
| case "Watch6,15": return "Apple Watch Series 8 45mm (GPS)" | |
| case "Watch6,17": return "Apple Watch Series 8 45mm (Cellular)" | |
| // ───────── SE (2nd) | |
| case "Watch6,10": return "Apple Watch SE (2nd gen) 40mm (GPS)" | |
| case "Watch6,12": return "Apple Watch SE (2nd gen) 40mm (Cellular)" | |
| case "Watch6,11": return "Apple Watch SE (2nd gen) 44mm (GPS)" | |
| case "Watch6,13": return "Apple Watch SE (2nd gen) 44mm (Cellular)" | |
| // ───────── Series 9 | |
| case "Watch7,1": return "Apple Watch Series 9 41mm (GPS)" | |
| case "Watch7,3": return "Apple Watch Series 9 41mm (Cellular)" | |
| case "Watch7,2": return "Apple Watch Series 9 45mm (GPS)" | |
| case "Watch7,4": return "Apple Watch Series 9 45mm (Cellular)" | |
| // ───────── Series 10 | |
| case "Watch7,8": return "Apple Watch Series 10 42mm (GPS)" | |
| case "Watch7,10": return "Apple Watch Series 10 42mm (Cellular)" | |
| case "Watch7,9": return "Apple Watch Series 10 46mm (GPS)" | |
| case "Watch7,11": return "Apple Watch Series 10 46mm (Cellular)" | |
| // ───────── Series 11 | |
| case "Watch7,17": return "Apple Watch Series 11 42mm (GPS)" | |
| case "Watch7,19": return "Apple Watch Series 11 42mm (Cellular)" | |
| case "Watch7,18": return "Apple Watch Series 11 46mm (GPS)" | |
| case "Watch7,20": return "Apple Watch Series 11 46mm (Cellular)" | |
| // ───────── SE (3rd) | |
| case "Watch7,13": return "Apple Watch SE (3rd gen) 40mm (GPS)" | |
| case "Watch7,15": return "Apple Watch SE (3rd gen) 40mm (Cellular)" | |
| case "Watch7,14": return "Apple Watch SE (3rd gen) 44mm (GPS)" | |
| case "Watch7,16": return "Apple Watch SE (3rd gen) 44mm (Cellular)" | |
| // ───────── Ultra | |
| case "Watch6,18": return "Apple Watch Ultra (Cellular)" | |
| case "Watch7,5": return "Apple Watch Ultra 2 (Cellular)" | |
| case "Watch7,12": return "Apple Watch Ultra 3 (Cellular)" | |
| // ───────── Simulator | |
| case "i386", "x86_64", "arm64": | |
| let simID = ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "watchOS" | |
| return "Simulator (\(mapToName(identifier: simID)))" // Simulator | |
| // ───────── Unknown device | |
| default: | |
| return identifier | |
| } | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Original post:
https://medium.com/@Jager-yoo/how-to-get-watchos-device-model-name-size-gps-cellular-a1810dfccd58