3
3
// the purpose of the script is to extract only the iOS information that Sentry cares about
4
4
// and discard the rest of the JSON so we do not end up bloating bundle size.
5
5
6
+ // see https://theapplewiki.com/wiki/models
6
7
const iOSDeviceMapping : Record < string , string > = {
8
+ // iPod touch
7
9
'iPod1,1' : 'iPod touch' ,
8
10
'iPod2,1' : 'iPod touch (2nd generation)' ,
9
11
'iPod3,1' : 'iPod touch (3rd generation)' ,
10
12
'iPod4,1' : 'iPod touch (4th generation)' ,
11
13
'iPod5,1' : 'iPod touch (5th generation)' ,
12
14
'iPod7,1' : 'iPod touch (6th generation)' ,
13
15
'iPod9,1' : 'iPod touch (7th generation)' ,
16
+ // iPhone
14
17
'iPhone1,1' : 'iPhone' ,
15
18
'iPhone1,2' : 'iPhone 3G' ,
16
19
'iPhone2,1' : 'iPhone 3GS' ,
@@ -64,6 +67,11 @@ const iOSDeviceMapping: Record<string, string> = {
64
67
'iPhone15,5' : 'iPhone 15 Plus' ,
65
68
'iPhone16,1' : 'iPhone 15 Pro' ,
66
69
'iPhone16,2' : 'iPhone 15 Pro Max' ,
70
+ 'iPhone17,1' : 'iPhone 16 Pro' ,
71
+ 'iPhone17,2' : 'iPhone 16 Pro Max' ,
72
+ 'iPhone17,3' : 'iPhone 16' ,
73
+ 'iPhone17,4' : 'iPhone 16 Plus' ,
74
+ // iPad Pro
67
75
'iPad6,7' : 'iPad Pro (12.9-inch)' ,
68
76
'iPad6,8' : 'iPad Pro (12.9-inch)' ,
69
77
'iPad6,3' : 'iPad Pro (9.7-inch)' ,
@@ -96,6 +104,11 @@ const iOSDeviceMapping: Record<string, string> = {
96
104
'iPad13,11' : 'iPad Pro (12.9-inch) (5th generation)' ,
97
105
'iPad14,5' : 'iPad Pro (12.9-inch) (6th generation)' ,
98
106
'iPad14,6' : 'iPad Pro (12.9-inch) (6th generation)' ,
107
+ 'iPad16,3' : 'iPad Pro (11-inch) (5th generation)' ,
108
+ 'iPad16,4' : 'iPad Pro (11-inch) (5th generation)' ,
109
+ 'iPad16,5' : 'iPad Pro (12.9-inch) (7th generation)' ,
110
+ 'iPad16,6' : 'iPad Pro (12.9-inch) (7th generation)' ,
111
+ // iPad mini
99
112
'iPad2,5' : 'iPad mini' ,
100
113
'iPad2,6' : 'iPad mini' ,
101
114
'iPad2,7' : 'iPad mini' ,
@@ -111,6 +124,7 @@ const iOSDeviceMapping: Record<string, string> = {
111
124
'iPad11,2' : 'iPad mini (5th generation)' ,
112
125
'iPad14,1' : 'iPad mini (6th generation)' ,
113
126
'iPad14,2' : 'iPad mini (6th generation)' ,
127
+ // iPad Air
114
128
'iPad4,1' : 'iPad Air' ,
115
129
'iPad4,2' : 'iPad Air' ,
116
130
'iPad4,3' : 'iPad Air' ,
@@ -122,6 +136,11 @@ const iOSDeviceMapping: Record<string, string> = {
122
136
'iPad13,2' : 'iPad Air (4th generation)' ,
123
137
'iPad13,16' : 'iPad Air (5th generation)' ,
124
138
'iPad13,17' : 'iPad Air (5th generation)' ,
139
+ 'iPad14,8' : 'iPad Air (6th generation)' ,
140
+ 'iPad14,9' : 'iPad Air (6th generation)' ,
141
+ 'iPad14,10' : 'iPad Air (7th generation)' ,
142
+ 'iPad14,11' : 'iPad Air (7th generation)' ,
143
+ // iPad
125
144
'iPad1,1' : 'iPad' ,
126
145
'iPad2,1' : 'iPad 2' ,
127
146
'iPad2,2' : 'iPad 2' ,
@@ -145,9 +164,7 @@ const iOSDeviceMapping: Record<string, string> = {
145
164
'iPad12,2' : 'iPad (9th generation)' ,
146
165
'iPad13,18' : 'iPad (10th generation)' ,
147
166
'iPad13,19' : 'iPad (10th generation)' ,
148
- 'AudioAccessory1,1' : 'HomePod' ,
149
- 'AudioAccessory1,2' : 'HomePod' ,
150
- 'AudioAccessory5,1' : 'HomePod mini' ,
167
+ // Apple Watch
151
168
'Watch1,1' : 'Apple Watch (1st generation)' ,
152
169
'Watch1,2' : 'Apple Watch (1st generation)' ,
153
170
'Watch2,6' : 'Apple Watch Series 1' ,
@@ -192,7 +209,11 @@ const iOSDeviceMapping: Record<string, string> = {
192
209
'Watch7,4' : 'Apple Watch Series 9' ,
193
210
'Watch7,3' : 'Apple Watch Series 9' ,
194
211
'Watch7,5' : 'Apple Watch Ultra 2' ,
195
-
212
+ 'Watch7,8' : 'Apple Watch Series 10' ,
213
+ 'Watch7,9' : 'Apple Watch Series 10' ,
214
+ 'Watch7,10' : 'Apple Watch Series 10' ,
215
+ 'Watch7,11' : 'Apple Watch Series 10' ,
216
+ // Apple TV
196
217
'AppleTV1,1' : 'Apple TV (1st generation)' ,
197
218
'AppleTV2,1' : 'Apple TV (2nd generation)' ,
198
219
'AppleTV3,1' : 'Apple TV (3rd generation)' ,
@@ -201,13 +222,6 @@ const iOSDeviceMapping: Record<string, string> = {
201
222
'AppleTV6,2' : 'Apple TV 4K' ,
202
223
'AppleTV11,1' : 'Apple TV 4K (2nd generation)' ,
203
224
'AppleTV14,1' : 'Apple TV 4K (3rd generation)' ,
204
- 'AirTag1,1' : 'AirTag' ,
205
- 'AirPods1,1' : 'AirPods (1st generation)' ,
206
- 'AirPods2,1,AirPods2,1' : 'AirPods (2nd generation)' ,
207
- 'AirPods1,3,Audio2,1' : 'AirPods (3rd generation)' ,
208
- 'AirPods2,2,AirPodsPro1,1,iProd8,1' : 'AirPods Pro' ,
209
- 'AirPodsPro1,2' : 'AirPods Pro (2nd generation)' ,
210
- 'AirPodsMax1,1,iProd8,6' : 'AirPods Max' ,
211
225
} ;
212
226
213
227
export { iOSDeviceMapping } ;
0 commit comments