Skip to content

Commit 16b89ba

Browse files
authored
Fix description being used for Simulator safeDescription. (devicekit#257)
Fixes devicekit#255
1 parent 0df4d39 commit 16b89ba

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

Source/Device.generated.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ extension Device: CustomStringConvertible {
10741074
case .iPadPro11Inch2: return "iPad Pro (11-inch) (2nd generation)"
10751075
case .iPadPro12Inch4: return "iPad Pro (12.9-inch) (4th generation)"
10761076
case .homePod: return "HomePod"
1077-
case .simulator(let model): return "Simulator (\(model))"
1077+
case .simulator(let model): return "Simulator (\(model.description))"
10781078
case .unknown(let identifier): return identifier
10791079
}
10801080
#elseif os(watchOS)
@@ -1091,14 +1091,14 @@ extension Device: CustomStringConvertible {
10911091
case .appleWatchSeries4_44mm: return "Apple Watch Series 4 44mm"
10921092
case .appleWatchSeries5_40mm: return "Apple Watch Series 5 40mm"
10931093
case .appleWatchSeries5_44mm: return "Apple Watch Series 5 44mm"
1094-
case .simulator(let model): return "Simulator (\(model))"
1094+
case .simulator(let model): return "Simulator (\(model.description))"
10951095
case .unknown(let identifier): return identifier
10961096
}
10971097
#elseif os(tvOS)
10981098
switch self {
10991099
case .appleTVHD: return "Apple TV HD"
11001100
case .appleTV4K: return "Apple TV 4K"
1101-
case .simulator(let model): return "Simulator (\(model))"
1101+
case .simulator(let model): return "Simulator (\(model.description))"
11021102
case .unknown(let identifier): return identifier
11031103
}
11041104
#endif
@@ -1159,7 +1159,7 @@ extension Device: CustomStringConvertible {
11591159
case .iPadPro11Inch2: return "iPad Pro (11-inch) (2nd generation)"
11601160
case .iPadPro12Inch4: return "iPad Pro (12.9-inch) (4th generation)"
11611161
case .homePod: return "HomePod"
1162-
case .simulator(let model): return "Simulator (\(model))"
1162+
case .simulator(let model): return "Simulator (\(model.safeDescription))"
11631163
case .unknown(let identifier): return identifier
11641164
}
11651165
#elseif os(watchOS)
@@ -1176,14 +1176,14 @@ extension Device: CustomStringConvertible {
11761176
case .appleWatchSeries4_44mm: return "Apple Watch Series 4 44mm"
11771177
case .appleWatchSeries5_40mm: return "Apple Watch Series 5 40mm"
11781178
case .appleWatchSeries5_44mm: return "Apple Watch Series 5 44mm"
1179-
case .simulator(let model): return "Simulator (\(model))"
1179+
case .simulator(let model): return "Simulator (\(model.safeDescription))"
11801180
case .unknown(let identifier): return identifier
11811181
}
11821182
#elseif os(tvOS)
11831183
switch self {
11841184
case .appleTVHD: return "Apple TV HD"
11851185
case .appleTV4K: return "Apple TV 4K"
1186-
case .simulator(let model): return "Simulator (\(model))"
1186+
case .simulator(let model): return "Simulator (\(model.safeDescription))"
11871187
case .unknown(let identifier): return identifier
11881188
}
11891189
#endif

Source/Device.swift.gyb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -755,23 +755,23 @@ extension Device: CustomStringConvertible {
755755
% for device in iOSDevices:
756756
case .${device.caseName}: return "${device.description}"
757757
% end
758-
case .simulator(let model): return "Simulator (\(model))"
758+
case .simulator(let model): return "Simulator (\(model.description))"
759759
case .unknown(let identifier): return identifier
760760
}
761761
#elseif os(watchOS)
762762
switch self {
763763
% for device in watchOSDevices:
764764
case .${device.caseName}: return "${device.description}"
765765
% end
766-
case .simulator(let model): return "Simulator (\(model))"
766+
case .simulator(let model): return "Simulator (\(model.description))"
767767
case .unknown(let identifier): return identifier
768768
}
769769
#elseif os(tvOS)
770770
switch self {
771771
% for device in tvOSDevices:
772772
case .${device.caseName}: return "${device.description}"
773773
% end
774-
case .simulator(let model): return "Simulator (\(model))"
774+
case .simulator(let model): return "Simulator (\(model.description))"
775775
case .unknown(let identifier): return identifier
776776
}
777777
#endif
@@ -787,23 +787,23 @@ extension Device: CustomStringConvertible {
787787
% for device in iOSDevices:
788788
case .${device.caseName}: return "${device.safeDescription}"
789789
% end
790-
case .simulator(let model): return "Simulator (\(model))"
790+
case .simulator(let model): return "Simulator (\(model.safeDescription))"
791791
case .unknown(let identifier): return identifier
792792
}
793793
#elseif os(watchOS)
794794
switch self {
795795
% for device in watchOSDevices:
796796
case .${device.caseName}: return "${device.safeDescription}"
797797
% end
798-
case .simulator(let model): return "Simulator (\(model))"
798+
case .simulator(let model): return "Simulator (\(model.safeDescription))"
799799
case .unknown(let identifier): return identifier
800800
}
801801
#elseif os(tvOS)
802802
switch self {
803803
% for device in tvOSDevices:
804804
case .${device.caseName}: return "${device.safeDescription}"
805805
% end
806-
case .simulator(let model): return "Simulator (\(model))"
806+
case .simulator(let model): return "Simulator (\(model.safeDescription))"
807807
case .unknown(let identifier): return identifier
808808
}
809809
#endif

0 commit comments

Comments
 (0)