Skip to content

Commit

Permalink
Improves detection for Apple devices (#7472)
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuconcioiu committed Sep 24, 2023
1 parent 361f4e1 commit a1a1ee0
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
64 changes: 64 additions & 0 deletions Tests/fixtures/phablet-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1579,3 +1579,67 @@
model: Pova Neo 3
os_family: Android
browser_family: Unknown
-
user_agent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/21A350 [FBAN/FBIOS;FBDV/iPhone15,4;FBMD/iPhone;FBSN/iOS;FBSV/17.0.2;FBSS/3;FBID/phone;FBLC/it_IT;FBOP/5]'
os:
name: iOS
version: 17.0.2
platform: ""
client:
type: mobile app
name: Facebook
version: ""
device:
type: phablet
brand: Apple
model: iPhone 15
os_family: iOS
browser_family: Unknown
-
user_agent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/21A350 [FBAN/FBIOS;FBDV/iPhone15,5;FBMD/iPhone;FBSN/iOS;FBSV/17.0.2;FBSS/3;FBID/phone;FBLC/it_IT;FBOP/5]'
os:
name: iOS
version: 17.0.2
platform: ""
client:
type: mobile app
name: Facebook
version: ""
device:
type: phablet
brand: Apple
model: iPhone 15 Plus
os_family: iOS
browser_family: Unknown
-
user_agent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/21A350 [FBAN/FBIOS;FBDV/iPhone16,1;FBMD/iPhone;FBSN/iOS;FBSV/17.0.2;FBSS/3;FBID/phone;FBLC/it_IT;FBOP/5]'
os:
name: iOS
version: 17.0.2
platform: ""
client:
type: mobile app
name: Facebook
version: ""
device:
type: phablet
brand: Apple
model: iPhone 15 Pro
os_family: iOS
browser_family: Unknown
-
user_agent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/21A350 [FBAN/FBIOS;FBDV/iPhone16,2;FBMD/iPhone;FBSN/iOS;FBSV/17.0.2;FBSS/3;FBID/phone;FBLC/it_IT;FBOP/5]'
os:
name: iOS
version: 17.0.2
platform: ""
client:
type: mobile app
name: Facebook
version: ""
device:
type: phablet
brand: Apple
model: iPhone 15 Pro Max
os_family: iOS
browser_family: Unknown
12 changes: 12 additions & 0 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,18 @@ Apple:
- regex: '(?:MDCR_|ICRU_|Apple-)?iPh(?:one)?14[C,_]7| 14\)$'
model: 'iPhone 14'
device: 'phablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPh(?:one)?15[C,_]5| 15PLUS\)$'
model: 'iPhone 15 Plus'
device: 'phablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPh(?:one)?16[C,_]1| 15PRO\)$'
model: 'iPhone 15 Pro'
device: 'phablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPh(?:one)?16[C,_]2| 15PROMAX\)$'
model: 'iPhone 15 Pro Max'
device: 'phablet'
- regex: '(?:MDCR_|ICRU_|Apple-)?iPh(?:one)?15[C,_]4| 15\)$'
model: 'iPhone 15'
device: 'phablet'

# specific tablet devices
- regex: '(?:MDCR_|ICRU_|Apple-)?iPad1[C,_]1'
Expand Down

0 comments on commit a1a1ee0

Please sign in to comment.