forked from dannycabrera/Get-iOS-Model
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iOSHardware.cs
323 lines (290 loc) · 10.5 KB
/
iOSHardware.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
namespace Xamarin.Forms.Devices
{
class iOSHardware
{
public string GetModel(string hardware)
{
// http://support.apple.com/kb/HT3939
if (hardware.StartsWith("iPhone"))
{
// ************
// iPhone
// ************
// Model(s): A1203
// Apple Tech specs: http://support.apple.com/kb/SP2
if (hardware == "iPhone1,1")
return "iPhone";
// ************
// iPhone 3G
// ************
// Model(s): A1241 & A1324
// Apple Tech specs: http://support.apple.com/kb/SP495
if (hardware == "iPhone1,2")
return "iPhone 3G";
// ************
// iPhone 3GS
// ************
// Model(s): A1303 & A1325
// Apple Tech specs: http://support.apple.com/kb/SP565
if (hardware == "iPhone2,1")
return "iPhone 3GS";
// ************
// iPhone 4
// ************
// Model(s): A1332
// Apple Tech specs: http://support.apple.com/kb/SP587
if (hardware == "iPhone3,1" || hardware == "iPhone3,2")
return "iPhone 4 GSM";
// Model(s): A1349
if (hardware == "iPhone3,3")
return "iPhone 4 CDMA";
// ************
// iPhone 4S
// ************
// Model(s): A1387 & A1431
// Apple Tech specs: http://support.apple.com/kb/SP643
if (hardware == "iPhone4,1")
return "iPhone 4S";
// ************
// iPhone 5
// ************
// Model(s): A1428
// Apple Tech specs: http://support.apple.com/kb/SP655
if (hardware == "iPhone5,1")
return "iPhone 5 GSM";
// Model(s): A1429 & A1442
if (hardware == "iPhone5,2")
return "iPhone 5 Global";
// ************
// iPhone 5C
// ************
// Model(s): A1456 & A1532
// Apple Tech specs: http://support.apple.com/kb/SP684
if (hardware == "iPhone5,3")
return "iPhone 5C GSM";
// Model(s): A1507, A1516, A1526 & A1529
if (hardware == "iPhone5,4")
return "iPhone 5C Global";
// ************
// iPhone 5S
// ************
// Model(s): A1453 & A1533
// Apple Tech specs: http://support.apple.com/kb/SP685
if (hardware == "iPhone6,1")
return "iPhone 5S GSM";
// Model(s): A1457, A1518, A1528 & A1530
if (hardware == "iPhone6,2")
return "iPhone 5S Global";
// ************
// iPhone 6
// ************
// Model(s): A1549, A1586 & A1589
// Apple Tech specs: http://support.apple.com/kb/SP705
if (hardware == "iPhone7,2")
return "iPhone 6";
// ************
// iPhone 6 Plus
// ************
// Model(s): A1522, A1524 & A1593
// Apple Tech specs: http://support.apple.com/kb/SP706
if (hardware == "iPhone7,1")
return "iPhone 6 Plus";
// ************
// iPhone 6S
// ************
// Model(s): A1633, A1688 & A1700
// Apple Tech specs: http://support.apple.com/kb/SP726
if (hardware == "iPhone8,1")
return "iPhone 6S";
// ************
// iPhone 6S Plus
// ************
// Model(s): A1634, A1687 & A1699
// Apple Tech specs: http://support.apple.com/kb/SP727
if (hardware == "iPhone8,2")
return "iPhone 6S Plus";
}
if (hardware.StartsWith("iPod"))
{
// ************
// iPod touch
// ************
// Model(s): A1213
// Apple Tech specs: http://support.apple.com/kb/SP3
if (hardware == "iPod1,1")
return "iPod touch";
// ************
// iPod touch 2G
// ************
// Model(s): A1288
// Apple Tech specs: http://support.apple.com/kb/SP496
if (hardware == "iPod2,1")
return "iPod touch 2G";
// ************
// iPod touch 3G
// ************
// Model(s): A1318
// Apple Tech specs: http://support.apple.com/kb/SP570
if (hardware == "iPod3,1")
return "iPod touch 3G";
// ************
// iPod touch 4G
// ************
// Model(s): A1367
// Apple Tech specs: http://support.apple.com/kb/SP594
if (hardware == "iPod4,1")
return "iPod touch 4G";
// ************
// iPod touch 5G
// ************
// Model(s): A1421 & A1509
// Apple Tech specs: (A1421) http://support.apple.com/kb/SP657 & (A1509) http://support.apple.com/kb/SP675
if (hardware == "iPod5,1")
return "iPod touch 5G";
// ************
// iPod touch 6G
// ************
// Model(s): A1574
// Apple Tech specs: (A1574) https://support.apple.com/kb/SP720
if (hardware == "iPod7,1")
return "iPod touch 6G";
}
if (hardware.StartsWith("iPad"))
{
// ************
// iPad
// ************
// Model(s): A1219 (WiFi) & A1337 (GSM)
// Apple Tech specs: http://support.apple.com/kb/SP580
if (hardware == "iPad1,1")
return "iPad";
// ************
// iPad 2
// ************
// Apple Tech specs: http://support.apple.com/kb/SP622
// Model(s): A1395
if (hardware == "iPad2,1")
return "iPad 2 WiFi";
// Model(s): A1396
if (hardware == "iPad2,2")
return "iPad 2 GSM";
// Model(s): A1397
if (hardware == "iPad2,3")
return "iPad 2 CDMA";
// Model(s): A1395
if (hardware == "iPad2,4")
return "iPad 2 Wifi";
// ************
// iPad 3
// ************
// Apple Tech specs: http://support.apple.com/kb/SP647
// Model(s): A1416
if (hardware == "iPad3,1")
return "iPad 3 WiFi";
// Model(s): A1403
if (hardware == "iPad3,2")
return "iPad 3 Wi-Fi + Cellular (VZ)";
// Model(s): A1430
if (hardware == "iPad3,3")
return "iPad 3 Wi-Fi + Cellular";
// ************
// iPad 4
// ************
// Apple Tech specs: http://support.apple.com/kb/SP662
// Model(s): A1458
if (hardware == "iPad3,4")
return "iPad 4 Wifi";
// Model(s): A1459
if (hardware == "iPad3,5")
return "iPad 4 Wi-Fi + Cellular";
// Model(s): A1460
if (hardware == "iPad3,6")
return "iPad 4 Wi-Fi + Cellular (MM)";
// ************
// iPad Air
// ************
// Apple Tech specs: http://support.apple.com/kb/SP692
// Model(s): A1474
if (hardware == "iPad4,1")
return "iPad Air Wifi";
// Model(s): A1475
if (hardware == "iPad4,2")
return "iPad Air Wi-Fi + Cellular";
// Model(s): A1476
if (hardware == "iPad4,3")
return "iPad Air Wi-Fi + Cellular (TD-LTE)";
// ************
// iPad Air 2
// ************
// Apple Tech specs:
// Model(s): A1566
if (hardware == "iPad5,3")
return "iPad Air 2";
// Model(s): A1567
if (hardware == "iPad5,4")
return "iPad Air 2";
// ************
// iPad Pro
// ************
// Apple Tech specs: https://support.apple.com/kb/SP723
// Model(s): A1584 (Wi-Fi)
if (hardware == "iPad6,7")
return "iPad Pro";
// Model(s): A1652 (Wi-Fi + Cellular)
if (hardware == "iPad6,8")
return "iPad Pro Wi-Fi + Cellular";
// ************
// iPad mini
// ************
// Apple Tech specs: http://support.apple.com/kb/SP661
// Model(s): A1432
if (hardware == "iPad2,5")
return "iPad mini Wifi";
// Model(s): A1454
if (hardware == "iPad2,6")
return "iPad mini Wi-Fi + Cellular";
// Model(s): A1455
if (hardware == "iPad2,7")
return "iPad mini Wi-Fi + Cellular (MM)";
// ************
// iPad mini 2
// ************
// Apple Tech specs: http://support.apple.com/kb/SP693
// Model(s): A1489
if (hardware == "iPad4,4")
return "iPad mini 2 Wifi";
// Model(s): A1490
if (hardware == "iPad4,5")
return "iPad mini 2 Wi-Fi + Cellular";
// Model(s): A1491
if (hardware == "iPad4,6")
return "iPad mini 2 Wi-Fi + Cellular (TD-LTE)";
// ************
// iPad mini 3
// ************
// Apple Tech specs:
// Model(s): A1599
if (hardware == "iPad4,7")
return "iPad mini 3 Wifi";
// Model(s): A1600
if (hardware == "iPad4,8")
return "iPad mini 3 Wi-Fi + Cellular";
// Model(s): A1601
if (hardware == "iPad4,9")
return "iPad mini 3 Wi-Fi + Cellular (TD-LTE)";
// ************
// iPad mini 4
// ************
// Apple Tech specs: http://support.apple.com/kb/SP725
// Model(s):
if (hardware == "iPad5,1")
return "iPad mini 4";
if (hardware == "iPad5,2")
return "iPad mini 4";
}
if (hardware == "i386" || hardware == "x86_64")
return "Simulator";
return (hardware == "" ? "Unknown": hardware);
}
}
}