Skip to content

Commit 23636d9

Browse files
committed
add support for arm64 simulator
1 parent e03038b commit 23636d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/swift/Sources/DeviceInfo/iOS/UIDevice+ModelName.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public extension UIDevice {
8282
case "iPad8,5", "iPad8,6", "iPad8,7", "iPad8,8": return "iPad Pro (12.9-inch) (3rd generation)"
8383
case "iPad8,11", "iPad8,12": return "iPad Pro (12.9-inch) (4th generation)"
8484
case "iPad13,8", "iPad13,9", "iPad13,10", "iPad13,11":return "iPad Pro (12.9-inch) (5th generation)"
85-
case "i386", "x86_64": return "Simulator \(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "iOS"))"
85+
case "i386", "x86_64", "arm64": return "Simulator \(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "iOS"))"
8686
default: return identifier
8787
#elseif os(tvOS)
8888
case "AppleTV1,1": return "Apple TV (1st generation)"
@@ -91,11 +91,11 @@ public extension UIDevice {
9191
case "AppleTV5,3": return "Apple TV (4th generation)"
9292
case "AppleTV6,2": return "Apple TV 4K (1st generation)"
9393
case "AppleTV11,1": return "Apple TV 4K (2nd generation)"
94-
case "i386", "x86_64": return "Simulator \(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "tvOS"))"
94+
case "i386", "x86_64", "arm64": return "Simulator \(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "tvOS"))"
9595
default: return identifier
9696
#elseif os(visionOS)
9797
case "RealityDevice14,1": return "Apple Vision Pro"
98-
case "i386", "x86_64": return "Simulator \(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "visionOS"))"
98+
case "i386", "x86_64", "arm64": return "Simulator \(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "visionOS"))"
9999
default: return identifier
100100
#endif
101101
}

0 commit comments

Comments
 (0)