-
Notifications
You must be signed in to change notification settings - Fork 94
/
Copy pathversion.h
332 lines (266 loc) · 9.38 KB
/
version.h
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
324
325
326
327
328
329
330
331
332
/**
* CoreFoundation Version Header
*
* by HASHBANG Productions
* Public Domain
*
* 2.0 478.23
* 2.1 478.26
* 2.2 478.29
* 3.0 478.47
* 3.1 478.52
* 3.2 478.61
* 4.0 550.32
* 4.1 550.38
* 4.2 550.52
* 4.3 550.58
* 5.0 675.00
* 5.1 690.10
* 6.x 793.00
* 7.0 847.20
* 7.0.3 847.21
* 7.1 847.26
* 8.0 1140.10
* 8.1 1141.14
* 8.2 1142.16
* 8.3 1144.17
* 8.4 1145.15
* 9.0 1240.1
* 9.1 1241.11
* 9.2 1242.13
* 9.3 1280.30
* 10.0 1348.00
* 10.1 1348.00
* 10.2 1348.22
* 10.3 1349.56
* 11.0 1443.00
* 11.1 1445.32
* 11.2 1450.14
* 11.3 1452.23
* 11.4 1452.23
* 12.0 1556.00
* 12.1 1560.10
* 12.2 1570.15
* 12.3 1575.13
* 12.4 1575.17
* 12.5 1575.23
* 13.0 1665.15
* 13.1 1671.101
* 13.2 1673.126
* 13.3 1674.102
* 13.4 1675.129
* 13.5 1676.104
* 14.0 1751.108
* 14.1 1751.108
* 14.2 1770.106
* 14.3 1770.300
* 14.4 1774.101
* 14.5 1775.118
* 14.6 1776.103
* 14.7 1777.103
* 14.8 1778.101
* 15.0 1854
* 15.1 1855.105
* 15.2 1856.105
* 15.3 1856.105
* 15.4 1858.112
* 16.0 1946.102
* 16.1 1953.1
* 16.4 1971
*
* Reference:
* https://iphonedev.wiki/index.php/CoreFoundation.framework#Versions
*/
// iOS 2.0 – 4.2 are defined in <CoreFoundation/CFBase.h>. The format prior to 4.0 is
// kCFCoreFoundationVersionNumber_iPhoneOS_X_Y. 4.0 and newer have the format
// kCFCoreFoundationVersionNumber_iOS_X_Y.
#import <CoreFoundation/CFBase.h>
// Newer version number #defines may or may not be defined. For instance, the iOS 5, 6, 7 SDKs
// didn’t define any newer version than iOS 4.2. 9.3 SDK defines versions up to iOS 8.4. 10.1 SDK
// defines versions up to 9.4(!) but not 10.0
#ifndef kCFCoreFoundationVersionNumber_iOS_4_3
#define kCFCoreFoundationVersionNumber_iOS_4_3 550.58
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_5_0
#define kCFCoreFoundationVersionNumber_iOS_5_0 675.00
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_5_1
#define kCFCoreFoundationVersionNumber_iOS_5_1 690.10
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_6_0
#define kCFCoreFoundationVersionNumber_iOS_6_0 793.00
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_6_1
#define kCFCoreFoundationVersionNumber_iOS_6_1 793.00
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_7_0
#define kCFCoreFoundationVersionNumber_iOS_7_0 847.20
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_7_0_3
#define kCFCoreFoundationVersionNumber_iOS_7_0_3 847.21
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_7_1
#define kCFCoreFoundationVersionNumber_iOS_7_1 847.26
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_8_0
#define kCFCoreFoundationVersionNumber_iOS_8_0 1140.10
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_8_1
#define kCFCoreFoundationVersionNumber_iOS_8_1 1141.14
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_8_2
#define kCFCoreFoundationVersionNumber_iOS_8_2 1142.16
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_8_3
#define kCFCoreFoundationVersionNumber_iOS_8_3 1144.17
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_8_4
#define kCFCoreFoundationVersionNumber_iOS_8_4 1145.15
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_9_0
#define kCFCoreFoundationVersionNumber_iOS_9_0 1240.1
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_9_1
#define kCFCoreFoundationVersionNumber_iOS_9_1 1241.11
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_9_2
#define kCFCoreFoundationVersionNumber_iOS_9_2 1242.13
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_9_3
#define kCFCoreFoundationVersionNumber_iOS_9_3 1280.30
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_10_0
#define kCFCoreFoundationVersionNumber_iOS_10_0 1348.00
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_10_1
#define kCFCoreFoundationVersionNumber_iOS_10_1 1348.00
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_10_2
#define kCFCoreFoundationVersionNumber_iOS_10_2 1348.22
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_10_3
#define kCFCoreFoundationVersionNumber_iOS_10_3 1349.56
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_11_0
#define kCFCoreFoundationVersionNumber_iOS_11_0 1443.00
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_11_1
#define kCFCoreFoundationVersionNumber_iOS_11_1 1445.32
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_11_2
#define kCFCoreFoundationVersionNumber_iOS_11_2 1450.14
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_11_3
#define kCFCoreFoundationVersionNumber_iOS_11_3 1452.23
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_11_4
#define kCFCoreFoundationVersionNumber_iOS_11_4 1452.23
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_12_0
#define kCFCoreFoundationVersionNumber_iOS_12_0 1556.00
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_12_1
#define kCFCoreFoundationVersionNumber_iOS_12_1 1560.10
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_12_2
#define kCFCoreFoundationVersionNumber_iOS_12_2 1570.15
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_12_3
#define kCFCoreFoundationVersionNumber_iOS_12_3 1575.13
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_12_4
#define kCFCoreFoundationVersionNumber_iOS_12_4 1575.17
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_12_5
#define kCFCoreFoundationVersionNumber_iOS_12_5 1575.23
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_13_0
#define kCFCoreFoundationVersionNumber_iOS_13_0 1665.15
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_13_1
#define kCFCoreFoundationVersionNumber_iOS_13_1 1671.101
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_13_2
#define kCFCoreFoundationVersionNumber_iOS_13_2 1673.126
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_13_3
#define kCFCoreFoundationVersionNumber_iOS_13_3 1674.102
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_13_4
#define kCFCoreFoundationVersionNumber_iOS_13_4 1675.129
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_13_5
#define kCFCoreFoundationVersionNumber_iOS_13_5 1676.104
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_13_6
#define kCFCoreFoundationVersionNumber_iOS_13_6 1677.104
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_13_7
#define kCFCoreFoundationVersionNumber_iOS_13_7 1677.104
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_14_0
#define kCFCoreFoundationVersionNumber_iOS_14_0 1751.108
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_14_1
#define kCFCoreFoundationVersionNumber_iOS_14_1 1751.108
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_14_2
#define kCFCoreFoundationVersionNumber_iOS_14_2 1770.106
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_14_3
#define kCFCoreFoundationVersionNumber_iOS_14_3 1770.300
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_14_4
#define kCFCoreFoundationVersionNumber_iOS_14_4 1774.101
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_14_5
#define kCFCoreFoundationVersionNumber_iOS_14_5 1775.118
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_14_6
#define kCFCoreFoundationVersionNumber_iOS_14_6 1776.103
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_14_7
#define kCFCoreFoundationVersionNumber_iOS_14_7 1777.103
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_14_8
#define kCFCoreFoundationVersionNumber_iOS_14_8 1778.101
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_15_0
#define kCFCoreFoundationVersionNumber_iOS_15_0 1854
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_15_1
#define kCFCoreFoundationVersionNumber_iOS_15_1 1855.105
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_15_2
#define kCFCoreFoundationVersionNumber_iOS_15_2 1856.105
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_15_3
#define kCFCoreFoundationVersionNumber_iOS_15_3 1856.105
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_15_4
#define kCFCoreFoundationVersionNumber_iOS_15_4 1858.112
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_16_0
#define kCFCoreFoundationVersionNumber_iOS_16_0 1946.102
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_16_1
#define kCFCoreFoundationVersionNumber_iOS_16_1 1953.1
#endif
#ifndef kCFCoreFoundationVersionNumber_iOS_16_4
#define kCFCoreFoundationVersionNumber_iOS_16_4 1971
#endif
#ifndef kCFCoreFoundationVersionNumber10_10
#define kCFCoreFoundationVersionNumber10_10 1151.16
#endif
// Let’s also define some useful functions to check which firmware the user is on. (Note that
// feature detection is highly recommended where possible)
#define IS_IOS_OR_OLDER(version) (kCFCoreFoundationVersionNumber <= kCFCoreFoundationVersionNumber_##version)
#define IS_IOS_OR_NEWER(version) (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_##version)
#define IS_IOS_BETWEEN(start, end) (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_##start && kCFCoreFoundationVersionNumber <= kCFCoreFoundationVersionNumber_##end)
// And let’s make equivalent macros for macOS so it doesn’t feel lonely.
#define IS_MACOS_OR_OLDER(version) (kCFCoreFoundationVersionNumber <= kCFCoreFoundationVersionNumber##version)
#define IS_MACOS_OR_NEWER(version) (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber##version)
#define IS_MACOS_BETWEEN(start, end) (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber##start && kCFCoreFoundationVersionNumber <= kCFCoreFoundationVersionNumber##end)
#define IS_OSX_OR_OLDER(version) IS_MACOS_OR_OLDER(version)
#define IS_OSX_OR_NEWER(version) IS_MACOS_OR_NEWER(version)
#define IS_OSX_BETWEEN(version) IS_MACOS_BETWEEN(version)