Skip to content

Commit

Permalink
Improves detection for Apple devices and iOS, iPadOS (#7744)
Browse files Browse the repository at this point in the history
* Improves detection for iPadOS
* Improves version detection for iOS
* Adds detection for iPad Air 6 WiFi
* Adds detection for iPad Air 6
* Adds detection for iPad Air 7 WiFi
* Adds detection for iPad Air 7
* Adds detection for iPad Pro 5 11" WiFi
* Adds detection for iPad Pro 5 11"
* Adds detection for iPad Pro 7 12.9" WiFi
* Adds detection for iPad Pro 7 12.9"
* Adds detection for iPad Pro 4 11" WiFi
* Adds detection for Reuters News app
* Adds detection for iPad Pro 4 11"
* Adds detection for iPad Pro 6 12.9" WiFi
* Adds detection for iPad Pro 6 12.9"
  • Loading branch information
liviuconcioiu authored Jul 19, 2024
1 parent cf99fa6 commit a118d08
Show file tree
Hide file tree
Showing 6 changed files with 263 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Tests/Parser/Client/fixtures/mobile_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2081,3 +2081,9 @@
type: mobile app
name: TikTok
version: 34.9.0
-
user_agent: ReutersNews/6.0.3 iPad14,4 iPadOS/17.5.1 CFNetwork/1.0 Darwin/23.5.0
client:
type: mobile app
name: Reuters News
version: 6.0.3
16 changes: 16 additions & 0 deletions Tests/Parser/fixtures/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5102,3 +5102,19 @@
version: "1.0"
platform: ""
family: GNU/Linux
-
user_agent: com.theepochtimes.mobile/2.41.3 b12 (iphoneos17.2; iPad14,8; en-US; America/Los_Angeles); Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1
os:
name: iPadOS
short_name: IPA
version: "17.2"
platform: ""
family: iOS
-
user_agent: com.theepochtimes.mobile/2.37.1 b1 (iphoneos17.2; iPhone13,1; en-US; America/Phoenix); Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1
os:
name: iOS
short_name: IOS
version: "17.2"
platform: ""
family: iOS
192 changes: 192 additions & 0 deletions Tests/fixtures/tablet-11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7809,3 +7809,195 @@
model: KL9878AE
os_family: Android
browser_family: Chrome
-
user_agent: 'Mozilla/5.0 (iPad; CPU OS 17_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/21F90 [FBAN/FBIOS;FBAV/468.0.0.39.104;FBBV/609862394;FBDV/iPad14,8;FBMD/iPad;FBSN/iPadOS;FBSV/17.5.1;FBSS/2;FBID/tablet;FBLC/it_IT;FBOP/5;FBRV/0]'
os:
name: iPadOS
version: 17.5.1
platform: ""
client:
type: mobile app
name: Facebook
version: 468.0.0.39.104
device:
type: tablet
brand: Apple
model: iPad Air 6 11" WiFi
os_family: iOS
browser_family: Unknown
-
user_agent: 'Mozilla/5.0 (iPad; CPU OS 17_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/21F90 [FBAN/FBIOS;FBAV/468.0.0.39.104;FBBV/609862394;FBDV/iPad14,9;FBMD/iPad;FBSN/iPadOS;FBSV/17.5.1;FBSS/2;FBID/tablet;FBLC/it_IT;FBOP/5;FBRV/0]'
os:
name: iPadOS
version: 17.5.1
platform: ""
client:
type: mobile app
name: Facebook
version: 468.0.0.39.104
device:
type: tablet
brand: Apple
model: iPad Air 6 11"
os_family: iOS
browser_family: Unknown
-
user_agent: 'Mozilla/5.0 (iPad; CPU OS 17_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/21F90 [FBAN/FBIOS;FBAV/471.0.0.20.112;FBBV/618472162;FBDV/iPad14,10;FBMD/iPad;FBSN/iPadOS;FBSV/17.5.1;FBSS/2;FBID/tablet;FBLC/ja_JP;FBOP/5;FBRV/0]'
os:
name: iPadOS
version: 17.5.1
platform: ""
client:
type: mobile app
name: Facebook
version: 471.0.0.20.112
device:
type: tablet
brand: Apple
model: iPad Air 7 13" WiFi
os_family: iOS
browser_family: Unknown
-
user_agent: 'Mozilla/5.0 (iPad; CPU OS 17_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/21F90 [FBAN/FBIOS;FBAV/471.0.0.20.112;FBBV/618472162;FBDV/iPad14,11;FBMD/iPad;FBSN/iPadOS;FBSV/17.5.1;FBSS/2;FBID/tablet;FBLC/ja_JP;FBOP/5;FBRV/0]'
os:
name: iPadOS
version: 17.5.1
platform: ""
client:
type: mobile app
name: Facebook
version: 471.0.0.20.112
device:
type: tablet
brand: Apple
model: iPad Air 7 13"
os_family: iOS
browser_family: Unknown
-
user_agent: 'Mozilla/5.0 (iPad; CPU OS 17_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/21F90 [FBAN/FBIOS;FBAV/471.0.0.20.112;FBBV/618472162;FBDV/iPad16,3;FBMD/iPad;FBSN/iPadOS;FBSV/17.5.1;FBSS/2;FBID/tablet;FBLC/en_US;FBOP/5;FBRV/619023281]'
os:
name: iPadOS
version: 17.5.1
platform: ""
client:
type: mobile app
name: Facebook
version: 471.0.0.20.112
device:
type: tablet
brand: Apple
model: iPad Pro 5 11" WiFi
os_family: iOS
browser_family: Unknown
-
user_agent: 'Mozilla/5.0 (iPad; CPU OS 17_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/21F90 [FBAN/FBIOS;FBAV/468.0.0.39.104;FBBV/609862394;FBDV/iPad16,4;FBMD/iPad;FBSN/iPadOS;FBSV/17.5.1;FBSS/2;FBID/tablet;FBLC/de_DE;FBOP/5;FBRV/611504180]'
os:
name: iPadOS
version: 17.5.1
platform: ""
client:
type: mobile app
name: Facebook
version: 468.0.0.39.104
device:
type: tablet
brand: Apple
model: iPad Pro 5 11"
os_family: iOS
browser_family: Unknown
-
user_agent: 'Mozilla/5.0 (iPad; CPU OS 17_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/21F90 [FBAN/FBIOS;FBAV/468.0.0.39.104;FBBV/609862394;FBDV/iPad16,5;FBMD/iPad;FBSN/iPadOS;FBSV/17.5.1;FBSS/2;FBID/tablet;FBLC/en_GB;FBOP/5;FBRV/611756927];FBNV/1'
os:
name: iPadOS
version: 17.5.1
platform: ""
client:
type: mobile app
name: Facebook
version: 468.0.0.39.104
device:
type: tablet
brand: Apple
model: iPad Pro 7 13" WiFi
os_family: iOS
browser_family: Unknown
-
user_agent: 'Mozilla/5.0 (iPad; CPU OS 17_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/21F90 [FBAN/FBIOS;FBAV/471.0.0.20.112;FBBV/618472162;FBDV/iPad16,6;FBMD/iPad;FBSN/iPadOS;FBSV/17.5.1;FBSS/2;FBID/tablet;FBLC/en_US;FBOP/5;FBRV/618993062]'
os:
name: iPadOS
version: 17.5.1
platform: ""
client:
type: mobile app
name: Facebook
version: 471.0.0.20.112
device:
type: tablet
brand: Apple
model: iPad Pro 7 13"
os_family: iOS
browser_family: Unknown
-
user_agent: 'Mozilla/5.0 (iPad; CPU OS 17_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/21F90 [FBAN/FBIOS;FBAV/471.0.0.20.112;FBBV/618472162;FBDV/iPad14,3;FBMD/iPad;FBSN/iPadOS;FBSV/17.5.1;FBSS/2;FBID/tablet;FBLC/uk_UA;FBOP/5;FBRV/0]'
os:
name: iPadOS
version: 17.5.1
platform: ""
client:
type: mobile app
name: Facebook
version: 471.0.0.20.112
device:
type: tablet
brand: Apple
model: iPad Pro 4 11" WiFi
os_family: iOS
browser_family: Unknown
-
user_agent: ReutersNews/6.0.3 iPad14,4 iPadOS/17.5.1 CFNetwork/1.0 Darwin/23.5.0
os:
name: iPadOS
version: 17.5.1
platform: ""
client:
type: mobile app
name: Reuters News
version: 6.0.3
device:
type: tablet
brand: Apple
model: iPad Pro 4 11"
os_family: iOS
browser_family: Unknown
-
user_agent: 'Mozilla/5.0 (iPad; CPU OS 17_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/21G5061c [FBAN/FBIOS;FBAV/471.0.0.20.112;FBBV/618472162;FBDV/iPad14,5;FBMD/iPad;FBSN/iPadOS;FBSV/17.6;FBSS/2;FBID/tablet;FBLC/nl_NL;FBOP/5;FBRV/618993062]'
os:
name: iPadOS
version: "17.6"
platform: ""
client:
type: mobile app
name: Facebook
version: 471.0.0.20.112
device:
type: tablet
brand: Apple
model: iPad Pro 6 12.9" WiFi
os_family: iOS
browser_family: Unknown
-
user_agent: ReutersNews/6.0.3 iPad14,6 iPadOS/17.5.1 CFNetwork/1.0 Darwin/23.5.0
os:
name: iPadOS
version: 17.5.1
platform: ""
client:
type: mobile app
name: Reuters News
version: 6.0.3
device:
type: tablet
brand: Apple
model: iPad Pro 6 12.9"
os_family: iOS
browser_family: Unknown
5 changes: 5 additions & 0 deletions regexes/client/mobile_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2490,6 +2490,11 @@
name: 'WNYC'
version: '$1'

# Reuters News (https://apps.apple.com/us/app/reuters-news/id602660809)
- regex: 'ReutersNews(?: App)?[/ ]?([\d\.]+)?'
name: 'Reuters News'
version: '$1'

# Electron generic apps
- regex: ' (?!(?:AppleWebKit|brave|Franz|Mailspring|Notion|Basecamp|Evernote|catalyst|ramboxpro|BlueMail|BeakerBrowser|TweakStyle|Colibri|Polypane|VibeMate|(?:d|LT|Glass|Sushi|Flash|OhHai)Browser|Sizzy))([a-z0-9]*)(?:-desktop|-electron-app)?/(\d+\.[\d.]+).*Electron/'
name: '$1'
Expand Down
36 changes: 36 additions & 0 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1603,12 +1603,48 @@ Apple:
- regex: '(?:MDCR_|ICRU_|Apple-)?iPad13[C,_]2'
model: 'iPad Air 4'
device: 'tablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPad14[C,_]10'
model: 'iPad Air 7 13" WiFi'
device: 'tablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPad14[C,_]11'
model: 'iPad Air 7 13"'
device: 'tablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPad14[C,_]1|(?:iPad mini 6th Gen \(WiFi\))(?:[);/ ]|$)'
model: 'iPad Mini 6 WiFi'
device: 'tablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPad14[C,_]2'
model: 'iPad Mini 6'
device: 'tablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPad14[C,_]3'
model: 'iPad Pro 4 11" WiFi'
device: 'tablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPad14[C,_]4'
model: 'iPad Pro 4 11"'
device: 'tablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPad14[C,_]5'
model: 'iPad Pro 6 12.9" WiFi'
device: 'tablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPad14[C,_]6'
model: 'iPad Pro 6 12.9"'
device: 'tablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPad14[C,_]8'
model: 'iPad Air 6 11" WiFi'
device: 'tablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPad14[C,_]9'
model: 'iPad Air 6 11"'
device: 'tablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPad16[C,_]3'
model: 'iPad Pro 5 11" WiFi'
device: 'tablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPad16[C,_]4'
model: 'iPad Pro 5 11"'
device: 'tablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPad16[C,_]5'
model: 'iPad Pro 7 13" WiFi'
device: 'tablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPad16[C,_]6'
model: 'iPad Pro 7 13"'
device: 'tablet'

- regex: 'Apple-?TV2[C,_]1'
model: 'Apple TV 2'
Expand Down
8 changes: 8 additions & 0 deletions regexes/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,10 @@
name: 'iPadOS'
version: '$1.$2'

- regex: 'iphoneos(1[3-8])\.(\d+[\.\d]*); iPad'
name: 'iPadOS'
version: '$1.$2'

- regex: 'Pinterest for iOS/.*iPad.*; (\d(?:[\d\.]*))[)]$'
name: 'iPadOS'
version: '$1'
Expand All @@ -1249,6 +1253,10 @@
name: 'iOS'
version: '$1'

- regex: 'iphoneos(1[3-8])\.(\d+[\.\d]*); iPhone'
name: 'iOS'
version: '$1.$2'

- regex: 'Pinterest for iOS/.*iPhone.*; (\d(?:[\d\.]*))[)]$'
name: 'iOS'
version: '$1'
Expand Down

0 comments on commit a118d08

Please sign in to comment.