@@ -71,16 +71,27 @@ public final class Devices {
7171 "iPad Pro 11' (4th gen) (WiFi) (iPad14,3)" , "iPad Pro 11' (4th gen) (Cellular) (iPad14,4)" ,
7272 "iPad Pro 12.9' (6th gen) (WiFi) (iPad14,5)" , "iPad Pro 12.9' (6th gen) (Cellular) (iPad14,6)" };
7373
74+ private static final String [] iBridges = {"iMac Pro (2017) (iMacPro1,1)" , "MacBook Pro 15' (2018-2019) (MacBookPro15,1)" ,
75+ "MacBook Pro 13' 2018-2019) Four Thunderbolt 3 ports, (MacBookPro15,2)" , "Mac mini (2018) (Macmini8,1)" ,
76+ "Mac Pro (2019) (MacPro7,1)" , "MacBook Pro 15' (2019, AMD Radeon Pro Vega graphics) (MacBookPro15,3)" ,
77+ "MacBook Air 13' (Retina, 2018) (MacBookAir8,1)" , "MacBook Pro 13' (2019, Two Thunderbolt 3 ports) (MacBookPro15,4)" ,
78+ "MacBook Air 13' (Retina, 2019) (MacBookAir8,2)" , "MacBook Pro 16' (2019) (MacBookPro16,1)" ,
79+ "MacBook Air 13' (Retina, 2020) (MacBookAir9,1)" , "MacBook Pro 13' (2020, Four Thunderbolt 3 ports) (MacBookPro16,2)" ,
80+ "iMac 27' (Retina 5K, 2020) (iMac20,1)" , "iMac 27' (Retina 5K, 2020) (iMac20,2)" ,
81+ "MacBook Pro 13' (2020, Two Thunderbolt 3 ports) (MacBookPro16,3)" ,
82+ "MacBook Pro 16' (2019, AMD Radeon Pro 5600M graphics) (MacBookPro16,4)" };
83+
7484 private static final ObservableList <String > iPhoneList = FXCollections .observableArrayList (iPhones );
7585 private static final ObservableList <String > iPadList = FXCollections .observableArrayList (iPads );
86+ private static final ObservableList <String > iBridgeList = FXCollections .observableArrayList (iBridges );
7687
7788 private static final ObservableList <String > iPodList = unmodifiableArrayList ("iPod Touch 3" , "iPod Touch 4" ,
7889 "iPod Touch 5" , "iPod Touch 6" , "iPod Touch 7 (iPod9,1)" );
7990
8091 private static final ObservableList <String > AppleTVList = unmodifiableArrayList ("Apple TV 2G" , "Apple TV 3" ,
8192 "Apple TV 3 (2013)" , "Apple TV 4 (2015)" , "Apple TV 4K" );
8293
83- private static final ObservableList <String > deviceTypes = unmodifiableArrayList ("iPhone" , "iPod" , "iPad" , "AppleTV" );
94+ private static final ObservableList <String > deviceTypes = unmodifiableArrayList ("iPhone" , "iPod" , "iPad" , "AppleTV" , "T2 Mac" );
8495
8596 private static final Map <String , String > boardConfigs ;
8697
@@ -147,7 +158,7 @@ public static String modelToIdentifier(String deviceModel) {
147158 }
148159
149160 /**
150- * @return either "iPhone", "iPod", "iPad", or "AppleTV"
161+ * @return either "iPhone", "iPod", "iPad", "AppleTV", or "T2 Mac".
151162 */
152163 public static String getDeviceType (String identifier ) {
153164 if (identifier .startsWith ("iPhone" )) {
@@ -158,6 +169,8 @@ public static String getDeviceType(String identifier) {
158169 return "iPad" ;
159170 } else if (identifier .startsWith ("AppleTV" )) {
160171 return "AppleTV" ;
172+ } else if (identifier .startsWith ("iBridge" )) {
173+ return "T2 Mac" ;
161174 }
162175 throw new IllegalArgumentException ("Not found: " + identifier );
163176 }
@@ -168,6 +181,7 @@ public static ObservableList<String> getModelsForType(String deviceType) {
168181 case "iPod" -> iPodList ;
169182 case "iPad" -> iPadList ;
170183 case "AppleTV" -> AppleTVList ;
184+ case "T2 Mac" -> iBridgeList ;
171185 default -> FXCollections .emptyObservableList ();
172186 };
173187 }
@@ -177,6 +191,7 @@ public static String getOSNameForType(String deviceType) {
177191 case "iPhone" , "iPod" -> "iOS" ;
178192 case "iPad" -> "iOS/iPadOS" ;
179193 case "AppleTV" -> "tvOS" ;
194+ case "T2 Mac" -> "bridgeOS" ;
180195 default -> null ;
181196 };
182197 }
0 commit comments