Skip to content

Commit

Permalink
Added support for arm64 simulator (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixLisczyk authored Feb 12, 2021
1 parent dbddb02 commit fd3ccfc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Source/Device.generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -430,14 +430,14 @@ public enum Device {
case "iPad8,9", "iPad8,10": return iPadPro11Inch2
case "iPad8,11", "iPad8,12": return iPadPro12Inch4
case "AudioAccessory1,1": return homePod
case "i386", "x86_64": return simulator(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "iOS"))
case "i386", "x86_64", "arm64": return simulator(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "iOS"))
default: return unknown(identifier)
}
#elseif os(tvOS)
switch identifier {
case "AppleTV5,3": return appleTVHD
case "AppleTV6,2": return appleTV4K
case "i386", "x86_64": return simulator(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "tvOS"))
case "i386", "x86_64", "arm64": return simulator(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "tvOS"))
default: return unknown(identifier)
}
#elseif os(watchOS)
Expand All @@ -458,7 +458,7 @@ public enum Device {
case "Watch6,2", "Watch6,4": return appleWatchSeries6_44mm
case "Watch5,9", "Watch5,11": return appleWatchSE_40mm
case "Watch5,10", "Watch5,12": return appleWatchSE_44mm
case "i386", "x86_64": return simulator(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "watchOS"))
case "i386", "x86_64", "arm64": return simulator(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "watchOS"))
default: return unknown(identifier)
}
#endif
Expand Down
6 changes: 3 additions & 3 deletions Source/Device.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -310,23 +310,23 @@ public enum Device {
% for device in iOSDevices:
case ${', '.join(list(map(lambda device: "\"" + device + "\"", device.identifiers)))}: return ${device.caseName}
% end
case "i386", "x86_64": return simulator(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "iOS"))
case "i386", "x86_64", "arm64": return simulator(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "iOS"))
default: return unknown(identifier)
}
#elseif os(tvOS)
switch identifier {
% for device in tvOSDevices:
case ${', '.join(list(map(lambda device: "\"" + device + "\"", device.identifiers)))}: return ${device.caseName}
% end
case "i386", "x86_64": return simulator(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "tvOS"))
case "i386", "x86_64", "arm64": return simulator(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "tvOS"))
default: return unknown(identifier)
}
#elseif os(watchOS)
switch identifier {
% for device in watchOSDevices:
case ${', '.join(list(map(lambda device: "\"" + device + "\"", device.identifiers)))}: return ${device.caseName}
% end
case "i386", "x86_64": return simulator(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "watchOS"))
case "i386", "x86_64", "arm64": return simulator(mapToDevice(identifier: ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] ?? "watchOS"))
default: return unknown(identifier)
}
#endif
Expand Down

0 comments on commit fd3ccfc

Please sign in to comment.