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

Parse iPhone, iPad, and iPod as iOS devices #370

Merged
merged 1 commit into from
Jan 12, 2019
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
6 changes: 6 additions & 0 deletions regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,12 @@ os_parsers:
##########################
- regex: 'Outlook-(iOS)/\d+\.\d+\.prod\.iphone'

##########################
# iOS devices, the same regex matches mobile safari webviews
##########################
- regex: '(iPod|iPhone|iPad)'
os_replacement: 'iOS'

##########
# Apple TV
##########
Expand Down
7 changes: 7 additions & 0 deletions tests/test_os.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2419,6 +2419,13 @@ test_cases:
patch: '4'
patch_minor:

- user_agent_string: 'Zendesk for iPhone 1.2.1 (4395)'
family: 'iOS'
major:
minor:
patch:
patch_minor:

- user_agent_string: 'Mozilla/5.0+(Macintosh;+Intel+Mac+OS+X+10_11_6)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/52.0.2743.116+Safari/537.36'
family: 'Mac OS X'
major: '10'
Expand Down