1- #if os(iOS) || os(tvOS)
1+ #if os(iOS) || os(tvOS) || os(visionOS)
22import Foundation
33import UIKit
44
@@ -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,8 +91,12 @@ 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 " ) ) "
95- default : return identifier
94+ case " i386 " , " x86_64 " , " arm64 " : return " Simulator \( mapToDevice ( identifier: ProcessInfo ( ) . environment [ " SIMULATOR_MODEL_IDENTIFIER " ] ?? " tvOS " ) ) "
95+ default : return identifier
96+ #elseif os(visionOS)
97+ case " RealityDevice14,1 " : return " Apple Vision Pro "
98+ case " i386 " , " x86_64 " , " arm64 " : return " Simulator \( mapToDevice ( identifier: ProcessInfo ( ) . environment [ " SIMULATOR_MODEL_IDENTIFIER " ] ?? " visionOS " ) ) "
99+ default : return identifier
96100 #endif
97101 }
98102 }
0 commit comments