Skip to content

Commit

Permalink
Support for Series 9 and Ultra 2 watches
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentneo committed Sep 14, 2023
1 parent 5a0eadd commit f9d8a7b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
4 changes: 4 additions & 0 deletions WKDeviceComplete/DeviceModel.swift
Expand Up @@ -35,6 +35,8 @@ public enum DeviceModel: CaseIterable {
case series8
case se2
case ultra
case series9
case ultra2

case unknown
}
Expand Down Expand Up @@ -66,6 +68,8 @@ extension DeviceModel {
case (6, 10), (6, 11), (6, 12), (6, 13): return .se2
case (6, 14), (6, 15), (6, 16), (6, 17): return .series8
case (6, 18): return .ultra
case (7, 1), (7, 2), (7, 3), (7, 4): return .series9
case (7, 5): return .ultra2

default: return .unknown
}
Expand Down
10 changes: 10 additions & 0 deletions WKDeviceComplete/Identifier.swift
Expand Up @@ -144,6 +144,16 @@ extension Identifier: CustomStringConvertible {
return "Apple Watch Series 8, 45mm case (GPS + Cellular)"
case (6, 18):
return "Apple Watch Ultra"
case (7, 1):
return "Apple Watch Series 9, 41mm case (GPS)"
case (7, 2):
return "Apple Watch Series 9, 45mm case (GPS)"
case (7, 3):
return "Apple Watch Series 9, 41mm case (GPS + Cellular)"
case (7, 4):
return "Apple Watch Series 9, 45mm case (GPS + Cellular)"
case (7, 5):
return "Apple Watch Ultra 2"
default:
return "unknown"
}
Expand Down
8 changes: 5 additions & 3 deletions WKDeviceComplete/Screen.swift
Expand Up @@ -49,10 +49,12 @@ extension Screen {
case (4, 2), (4, 4), (5, 2), (5, 4), (5, 10),
(5, 12), (6, 2), (6, 4), (6, 11), (6, 13): return 44

case (6, 6), (6, 8), (6, 14), (6, 16): return 41
case (6, 7), (6, 9), (6, 15), (6, 17): return 45
case (6, 6), (6, 8), (6, 14), (6, 16),
(7, 1), (7, 3): return 41
case (6, 7), (6, 9), (6, 15), (6, 17),
(7, 2), (7, 4): return 45

case (6, 18): return 49
case (6, 18), (7, 5): return 49

default: return nil
}
Expand Down

0 comments on commit f9d8a7b

Please sign in to comment.