Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version:5.10
//===----------------------------------------------------------------------===//
//
// This source file is part of the DeviceKit open source project
Expand Down
24 changes: 23 additions & 1 deletion Source/Device.generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,14 @@ public enum Device {
///
/// ![Image]()
case appleWatchSeries11_46mm
/// Device is an [Apple Watch SE (3rd generation)](https://apple.com/apple-watch-se-3/specs)
///
/// ![Image](https://www.apple.com/v/apple-watch-se-3/b/images/specs/materials_and_finish__bc7ggddoo7vm_large_2x.jpg)
case appleWatchSE3_40mm
/// Device is an [Apple Watch SE (3rd generation)](https://apple.com/apple-watch-se-3/specs)
///
/// ![Image](https://www.apple.com/v/apple-watch-se-3/b/images/specs/materials_and_finish__bc7ggddoo7vm_large_2x.jpg)
case appleWatchSE3_44mm
#endif

/// Device is [Simulator](https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/iOS_Simulator_Guide/Introduction/Introduction.html)
Expand Down Expand Up @@ -735,6 +743,8 @@ public enum Device {
case "Watch7,12": return appleWatchUltra3
case "Watch7,17", "Watch7,19": return appleWatchSeries11_42mm
case "Watch7,18", "Watch7,20": return appleWatchSeries11_46mm
case "Watch7,13", "Watch7,14": return appleWatchSE3_40mm
case "Watch7,15", "Watch7,16": return appleWatchSE3_44mm
case "i386", "x86_64", "arm64": return simulator(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "watchOS"))
default: return unknown(identifier)
}
Expand Down Expand Up @@ -894,6 +904,8 @@ public enum Device {
case .appleWatchUltra3: return 2.2
case .appleWatchSeries11_42mm: return 1.9
case .appleWatchSeries11_46mm: return 2.0
case .appleWatchSE3_40mm: return 1.57
case .appleWatchSE3_44mm: return 1.78
case .simulator(let model): return model.diagonal
case .unknown: return -1
}
Expand Down Expand Up @@ -1033,6 +1045,8 @@ public enum Device {
case .appleWatchUltra3: return (width: 4, height: 5)
case .appleWatchSeries11_42mm: return (width: 374, height: 446)
case .appleWatchSeries11_46mm: return (width: 416, height: 496)
case .appleWatchSE3_40mm: return (width: 324, height: 394)
case .appleWatchSE3_44mm: return (width: 368, height: 448)
case .simulator(let model): return model.screenRatio
case .unknown: return (width: -1, height: -1)
}
Expand Down Expand Up @@ -1278,7 +1292,7 @@ public enum Device {
#elseif os(watchOS)
/// All Watches
public static var allWatches: [Device] {
return [.appleWatchSeries0_38mm, .appleWatchSeries0_42mm, .appleWatchSeries1_38mm, .appleWatchSeries1_42mm, .appleWatchSeries2_38mm, .appleWatchSeries2_42mm, .appleWatchSeries3_38mm, .appleWatchSeries3_42mm, .appleWatchSeries4_40mm, .appleWatchSeries4_44mm, .appleWatchSeries5_40mm, .appleWatchSeries5_44mm, .appleWatchSeries6_40mm, .appleWatchSeries6_44mm, .appleWatchSE_40mm, .appleWatchSE_44mm, .appleWatchSeries7_41mm, .appleWatchSeries7_45mm, .appleWatchSeries8_41mm, .appleWatchSeries8_45mm, .appleWatchSE2_40mm, .appleWatchSE2_44mm, .appleWatchUltra, .appleWatchSeries9_41mm, .appleWatchSeries9_45mm, .appleWatchUltra2, .appleWatchSeries10_42mm, .appleWatchSeries10_46mm, .appleWatchUltra3, .appleWatchSeries11_42mm, .appleWatchSeries11_46mm]
return [.appleWatchSeries0_38mm, .appleWatchSeries0_42mm, .appleWatchSeries1_38mm, .appleWatchSeries1_42mm, .appleWatchSeries2_38mm, .appleWatchSeries2_42mm, .appleWatchSeries3_38mm, .appleWatchSeries3_42mm, .appleWatchSeries4_40mm, .appleWatchSeries4_44mm, .appleWatchSeries5_40mm, .appleWatchSeries5_44mm, .appleWatchSeries6_40mm, .appleWatchSeries6_44mm, .appleWatchSE_40mm, .appleWatchSE_44mm, .appleWatchSeries7_41mm, .appleWatchSeries7_45mm, .appleWatchSeries8_41mm, .appleWatchSeries8_45mm, .appleWatchSE2_40mm, .appleWatchSE2_44mm, .appleWatchUltra, .appleWatchSeries9_41mm, .appleWatchSeries9_45mm, .appleWatchUltra2, .appleWatchSeries10_42mm, .appleWatchSeries10_46mm, .appleWatchUltra3, .appleWatchSeries11_42mm, .appleWatchSeries11_46mm, .appleWatchSE3_40mm, .appleWatchSE3_44mm]
}

/// All simulator Watches
Expand Down Expand Up @@ -1574,6 +1588,8 @@ public enum Device {
case .appleWatchUltra3: return 338
case .appleWatchSeries11_42mm: return 326
case .appleWatchSeries11_46mm: return 326
case .appleWatchSE3_40mm: return 326
case .appleWatchSE3_44mm: return 326
case .simulator(let model): return model.ppi
case .unknown: return nil
}
Expand Down Expand Up @@ -1745,6 +1761,8 @@ extension Device: CustomStringConvertible {
case .appleWatchUltra3: return "Apple Watch Ultra 3"
case .appleWatchSeries11_42mm: return "Apple Watch Series 11 42mm"
case .appleWatchSeries11_46mm: return "Apple Watch Series 11 46mm"
case .appleWatchSE3_40mm: return "Apple Watch SE (3rd generation) 40mm"
case .appleWatchSE3_44mm: return "Apple Watch SE (3rd generation) 44mm"
case .simulator(let model): return "Simulator (\(model.description))"
case .unknown(let identifier): return identifier
}
Expand Down Expand Up @@ -1903,6 +1921,8 @@ extension Device: CustomStringConvertible {
case .appleWatchUltra3: return "Apple Watch Ultra 3"
case .appleWatchSeries11_42mm: return "Apple Watch Series 11 42mm"
case .appleWatchSeries11_46mm: return "Apple Watch Series 11 46mm"
case .appleWatchSE3_40mm: return "Apple Watch SE (3rd generation) 40mm"
case .appleWatchSE3_44mm: return "Apple Watch SE (3rd generation) 44mm"
case .simulator(let model): return "Simulator (\(model.safeDescription))"
case .unknown(let identifier): return identifier
}
Expand Down Expand Up @@ -2607,6 +2627,8 @@ extension Device {
case .appleWatchUltra3: return .s10
case .appleWatchSeries11_42mm: return .s10
case .appleWatchSeries11_46mm: return .s10
case .appleWatchSE3_40mm: return .s10
case .appleWatchSE3_44mm: return .s10
case .simulator(let model): return model.cpu
case .unknown: return .unknown
}
Expand Down