Skip to content

Adds detection for MacBook Air, MacBook Pro devices #6594

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

Merged
merged 73 commits into from
Feb 4, 2021
Merged

Adds detection for MacBook Air, MacBook Pro devices #6594

merged 73 commits into from
Feb 4, 2021

Conversation

liviuconcioiu
Copy link
Collaborator

No description provided.

@liviuconcioiu
Copy link
Collaborator Author

One thing I have doubts about are user agents starting with Safari.
Safari/8536.30.1 CFNetwork/596.5 Darwin/12.5.0 (x86_64) (MacBookAir6%2C1)
For example here, the Webkit version is 536.30.1, which is not detected right now. Also, number right before Webkit version isn't the Safari version.

@sanchezzzhak
Copy link
Collaborator

One thing I have doubts about are user agents starting with Safari.
Safari/8536.30.1 CFNetwork/596.5 Darwin/12.5.0 (x86_64) (MacBookAir6%2C1)
For example here, the Webkit version is 536.30.1, which is not detected right now. Also, number right before Webkit version isn't the Safari version.

CFNetwork/
it is not a version of webkit or other applications https://developer.apple.com/documentation/cfnetwork

Safari/10602.2.14.0.7 CFNetwork/720.5.7 Darwin/14.5.0 (x86_64)
Safari/10603.3.8 CFNetwork/720.5.7 Darwin/14.5.0 (x86_64)
Safari/11602.1.50.0.10 CFNetwork/760.6.3 Darwin/15.6.0 (x86_64)
Safari/11602.3.12.0.1 CFNetwork/760.6.3 Darwin/15.6.0 (x86_64)
Safari/11602.4.8.0.1 CFNetwork/760.6.3 Darwin/15.6.0 (x86_64)
Safari/11603.1.30.0.34 CFNetwork/760.6.3 Darwin/15.6.0 (x86_64)
Safari/11603.2.5 CFNetwork/760.6.5 Darwin/15.6.0 (x86_64)
Safari/11603.3.8 CFNetwork/760.6.5 Darwin/15.6.0 (x86_64)
Safari/11604.1.38.1.7 CFNetwork/760.6.5 Darwin/15.6.0 (x86_64)
Safari/12602.2.14.0.7 CFNetwork/807.1.3 Darwin/16.1.0 (x86_64)
Safari/12602.4.8 CFNetwork/807.2.14 Darwin/16.4.0 (x86_64)
Safari/12603.1.30.0.34 CFNetwork/811.4.18 Darwin/16.5.0 (x86_64)
Safari/12603.2.4 CFNetwork/811.5.4 Darwin/16.6.0 (x86_64)
Safari/12603.3.8 CFNetwork/811.5.4 Darwin/16.7.0 (x86_64)
Safari/12604.1.38.1.7 CFNetwork/811.5.4 Darwin/16.7.0 (x86_64)
Safari/12604.3.5.1.1 CFNetwork/811.5.4 Darwin/16.7.0 (x86_64)
Safari/12605.3.8.1 CFNetwork/811.9 Darwin/16.7.0 (x86_64)
Safari/13604.3.5 CFNetwork/889.9 Darwin/17.2.0 (x86_64)
Safari/13604.4.7.1.3 CFNetwork/893.13.1 Darwin/17.3.0 (x86_64)
Safari/13604.5.6 CFNetwork/893.13.1 Darwin/17.4.0 (x86_64)
Safari/13605.1.33.1.2 CFNetwork/897.15 Darwin/17.5.0 (x86_64)
Safari/13605.1.33.1.4 CFNetwork/897.15 Darwin/17.5.0 (x86_64)
Safari/13605.2.8 CFNetwork/901.1 Darwin/17.6.0 (x86_64)
Safari/13605.3.8 CFNetwork/902.1 Darwin/17.7.0 (x86_64)
Safari/13606.2.11 CFNetwork/902.1 Darwin/17.7.0 (x86_64)
Safari/14606.1.36.1.9 CFNetwork/974.1 Darwin/18.0.0 (x86_64)

@sanchezzzhak
Copy link
Collaborator

Safari/14606.1.36.1.9 CFNetwork/974.1 Darwin/18.0.0 (x86_64)
Safari/([0-9]{2})([0-9]{3}).(\d+).(\d+)

safari $1.$3.$4 = 14.1.36 webkit $2 = 606
this is in theory, and even that won't be true

we know that the IOS version = version safari
we can assume that this request came from safari preview, then the operating system version will not match.

@liviuconcioiu liviuconcioiu changed the title Adds detection for MacBook Air devices Adds detection for MacBook Air, MacBook Pro devices Jan 21, 2021
name: Microsoft Office Excel
version: 16.44.1213
-
user_agent: Microsoft Office OneNote/16.43/201106 (iOS/14.0.1; Tablet; es-MX; AppStore; Apple/iPad11,6)
Copy link
Collaborator

@sanchezzzhak sanchezzzhak Jan 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here, too, you can define the device in the next PR

regex: Apple/iPad11,6
model: 'iPad 8 10.2" WiFi'

I think this list might help https://everyi.com/by-identifier/ipod-iphone-ipad-specs-by-model-identifier.html

sanchezzzhak
sanchezzzhak previously approved these changes Jan 22, 2021
sanchezzzhak
sanchezzzhak previously approved these changes Jan 22, 2021
This reverts commit 152f7f1.
This reverts commit bf8a3e4.
sgiehl
sgiehl previously approved these changes Feb 4, 2021
Copy link
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only had a rough look through the changes, but it imho looks good now.
@sanchezzzhak feel free to have another look and merge if everything is fine for you as well

@sanchezzzhak sanchezzzhak merged commit b796cc0 into matomo-org:master Feb 4, 2021
@liviuconcioiu liviuconcioiu deleted the macos branch February 4, 2021 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants