Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: parse Chrome and Edge mobile on iOS as iOS, even with desktop mode on #586

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,10 @@ os_parsers:
##########
- regex: '(Tizen)[/ ](\d+)\.(\d+)'

# Chrome and Edge on iOS with desktop mode contains Mac OS X, so it must be before any Mac OS check
- regex: 'Intel Mac OS X.+(CriOS|EdgiOS)/\d+'
os_replacement: 'iOS'

##########
# Mac OS
# @ref: http://en.wikipedia.org/wiki/Mac_OS_X#Versions
Expand Down
14 changes: 14 additions & 0 deletions tests/test_os.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2762,6 +2762,20 @@ test_cases:
patch: '3'
patch_minor:

- user_agent_string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/102 Version/11.1.1 Safari/605.1.15'
family: 'iOS'
major:
minor:
patch:
patch_minor:

- user_agent_string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) EdgiOS/125 Version/13.0.3 Safari/605.1.15'
family: 'iOS'
major:
minor:
patch:
patch_minor:

- user_agent_string: 'Mozilla/5.0 (iPhone; CPU IPhone OS 9_2_1 Like Mac OS X) AppleWebKit/601.1.46 (KHTML, Like Gecko) Mobile/13D15 [FBAN/FBIOS;FBAV/52.0.0.46.157;FBBV/26424168;FBDV/iPhone6,2;FBMD/iPhone;FBSN/iPhone OS;FBSV/9.2.1;FBSS/2; FBCR/Globe;FBID/phone;FBLC/en_US;FBOP/5]'
family: 'iOS'
major: '9'
Expand Down
Loading