@@ -29,12 +29,13 @@ export function deobfuscateAppleGPU(
29
29
const codeA = '801621810' as const ;
30
30
const codeB = '8016218135' as const ;
31
31
const codeC = '80162181161' as const ;
32
+ const codeFB = '80162181255' ;
32
33
33
34
// All chipsets that support at least iOS 12:
34
35
const possibleChipsets : [
35
36
string ,
36
37
typeof codeA | typeof codeB | typeof codeC ,
37
- number
38
+ number ,
38
39
] [ ] = deviceInfo ?. isIpad
39
40
? [
40
41
// ['a4', 5], // ipad 1st gen
@@ -66,12 +67,15 @@ export function deobfuscateAppleGPU(
66
67
[ 'a12' , codeA , 15 ] , // XS / XS Max / XR
67
68
[ 'a13' , codeA , 15 ] , // 11 / 11 pro / 11 pro max / se 2nd gen
68
69
[ 'a14' , codeA , 15 ] , // 12 / 12 mini / 12 pro / 12 pro max
70
+ [ 'a15' , codeA , 15 ] , // 13 / 13 mini / 13 pro / 13 pro max / se 3rd gen / 14 / 14 plus
71
+ [ 'a16' , codeA , 15 ] , // 14 pro / 14 pro max / 15 / 15 plus
72
+ [ 'a17' , codeA , 15 ] , // 15 pro / 15 pro max
69
73
] ;
70
74
let chipsets : typeof possibleChipsets ;
71
75
72
76
// In iOS 14.x Apple started normalizing the outcome of this hack,
73
77
// we use this fact to limit the list to devices that support ios 14+
74
- if ( pixelId === '80162181255' ) {
78
+ if ( pixelId === codeFB ) {
75
79
chipsets = possibleChipsets . filter ( ( [ , , iosVersion ] ) => iosVersion >= 14 ) ;
76
80
} else {
77
81
chipsets = possibleChipsets . filter ( ( [ , id ] ) => id === pixelId ) ;
@@ -82,7 +86,9 @@ export function deobfuscateAppleGPU(
82
86
}
83
87
const renderers = chipsets . map ( ( [ gpu ] ) => `apple ${ gpu } gpu` ) ;
84
88
debug ?.(
85
- `iOS 12.2+ obfuscates its GPU type and version, using closest matches: ${ JSON . stringify ( renderers ) } `
89
+ `iOS 12.2+ obfuscates its GPU type and version, using closest matches: ${ JSON . stringify (
90
+ renderers
91
+ ) } `
86
92
) ;
87
93
return renderers ;
88
94
}
0 commit comments