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

Improves detection for Apple Watch and version detection for iOS and macOS #7485

Merged
merged 2 commits into from
Oct 14, 2023
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
16 changes: 16 additions & 0 deletions Tests/Parser/fixtures/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3918,3 +3918,19 @@
version: 5.4.0
platform: x64
family: Android
-
user_agent: Aloha/1 CFNetwork/1483 Darwin/23.1.0
os:
name: iOS
short_name: IOS
version: "17.1"
platform:
family: iOS
-
user_agent: Safari/19616.8.27.211.1 CFNetwork/1483 Darwin/23.1.0
os:
name: Mac
short_name: MAC
version: "14.1"
platform:
family: Mac
182 changes: 182 additions & 0 deletions Tests/fixtures/wearable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2040,3 +2040,185 @@
model: "4"
os_family: Android
browser_family: Chrome
-
user_agent: 'com.apple.invitation-registration [Watch OS,9.0,20R361,Watch6,10]'
os:
name: watchOS
version: "9.0"
platform: ARM
client: null
device:
type: wearable
brand: Apple
model: Watch SE (Gen 2) 40mm
os_family: iOS
browser_family: Unknown
-
user_agent: 'com.apple.invitation-registration [Watch OS,9.0,20R361,Watch6,11]'
os:
name: watchOS
version: "9.0"
platform: ARM
client: null
device:
type: wearable
brand: Apple
model: Watch SE (Gen 2) 44mm
os_family: iOS
browser_family: Unknown
-
user_agent: 'com.apple.invitation-registration [Watch OS,9.1,20S75,Watch6,12]'
os:
name: watchOS
version: "9.1"
platform: ARM
client: null
device:
type: wearable
brand: Apple
model: Watch SE (Gen 2) 40mm
os_family: iOS
browser_family: Unknown
-
user_agent: 'com.apple.invitation-registration [Watch OS,9.1,20S75,Watch6,13]'
os:
name: watchOS
version: "9.1"
platform: ARM
client: null
device:
type: wearable
brand: Apple
model: Watch SE (Gen 2) 44mm
os_family: iOS
browser_family: Unknown
-
user_agent: 'com.apple.invitation-registration [Watch OS,9.1,20S75,Watch6,14]'
os:
name: watchOS
version: "9.1"
platform: ARM
client: null
device:
type: wearable
brand: Apple
model: Watch Series 8 41mm
os_family: iOS
browser_family: Unknown
-
user_agent: 'com.apple.invitation-registration [Watch OS,9.0,20R361,Watch6,15]'
os:
name: watchOS
version: "9.0"
platform: ARM
client: null
device:
type: wearable
brand: Apple
model: Watch Series 8 45mm
os_family: iOS
browser_family: Unknown
-
user_agent: 'com.apple.invitation-registration [Watch OS,9.4,20T253,Watch6,16]'
os:
name: watchOS
version: "9.4"
platform: ARM
client: null
device:
type: wearable
brand: Apple
model: Watch Series 8 41mm
os_family: iOS
browser_family: Unknown
-
user_agent: aceApps (watchOS 9.0; Apple Watch6,17; naverapp_ios_watch; 11.17.2)
os:
name: watchOS
version: "9.0"
platform: ARM
client: null
device:
type: wearable
brand: Apple
model: Watch Series 8 45mm
os_family: iOS
browser_family: Unknown
-
user_agent: 'com.apple.invitation-registration [Watch OS,9.3.1,20S664,Watch6,18]'
os:
name: watchOS
version: 9.3.1
platform: ARM
client: null
device:
type: wearable
brand: Apple
model: Watch Ultra
os_family: iOS
browser_family: Unknown
-
user_agent: 'com.apple.invitation-registration [Watch OS,10.0,21R355,Watch7,1]'
os:
name: watchOS
version: "10.0"
platform: ARM
client: null
device:
type: wearable
brand: Apple
model: Watch Series 9 41mm
os_family: iOS
browser_family: Unknown
-
user_agent: 'com.apple.invitation-registration [Watch OS,10.0,21R355,Watch7,2]'
os:
name: watchOS
version: "10.0"
platform: ARM
client: null
device:
type: wearable
brand: Apple
model: Watch Series 9 45mm
os_family: iOS
browser_family: Unknown
-
user_agent: 'com.apple.invitation-registration [Watch OS,10.0,21R355,Watch7,3]'
os:
name: watchOS
version: "10.0"
platform: ARM
client: null
device:
type: wearable
brand: Apple
model: Watch Series 9 41mm
os_family: iOS
browser_family: Unknown
-
user_agent: 'com.apple.invitation-registration [Watch OS,10.0,21R355,Watch7,4]'
os:
name: watchOS
version: "10.0"
platform: ARM
client: null
device:
type: wearable
brand: Apple
model: Watch Series 9 45mm
os_family: iOS
browser_family: Unknown
-
user_agent: 'com.apple.invitation-registration [Watch OS,10.0,21R355,Watch7,5]'
os:
name: watchOS
version: "10.0"
platform: ARM
client: null
device:
type: wearable
brand: Apple
model: Watch Ultra 2
os_family: iOS
browser_family: Unknown
24 changes: 24 additions & 0 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,24 @@ Apple:
- regex: 'Watch5,1[02]'
device: 'wearable'
model: 'Watch SE 44mm'
- regex: 'Watch6,1[02]'
device: 'wearable'
model: 'Watch SE (Gen 2) 40mm'
- regex: 'Watch6,1[13]'
device: 'wearable'
model: 'Watch SE (Gen 2) 44mm'
- regex: 'Watch6,1[46]'
device: 'wearable'
model: 'Watch Series 8 41mm'
- regex: 'Watch6,1[57]'
device: 'wearable'
model: 'Watch Series 8 45mm'
- regex: 'Watch6,18'
device: 'wearable'
model: 'Watch Ultra'
- regex: 'Watch7,5'
device: 'wearable'
model: 'Watch Ultra 2'
- regex: 'Watch([456]),[13]'
device: 'wearable'
model: 'Watch Series $1 40mm'
Expand All @@ -945,6 +963,12 @@ Apple:
- regex: 'Watch6,[79]'
device: 'wearable'
model: 'Watch Series 7 45mm'
- regex: 'Watch7,[13]'
device: 'wearable'
model: 'Watch Series 9 41mm'
- regex: 'Watch7,[24]'
device: 'wearable'
model: 'Watch Series 9 45mm'
- regex: 'Watch'
device: 'wearable'
model: 'Watch'
Expand Down
4 changes: 4 additions & 0 deletions regexes/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,8 @@
- regex: '^(?!com.apple.Safari.SearchHelper|Safari).*CFNetwork/.+ Darwin/(\d+[\.\d]+)(?!.*(?:x86_64|i386|PowerMac|Power%20Macintosh))'
name: 'iOS'
versions:
- regex: 'Darwin/23.1.0'
version: '17.1'
- regex: 'Darwin/23.0.0'
version: '17.0'
- regex: 'Darwin/22.6.0'
Expand Down Expand Up @@ -1030,6 +1032,8 @@
- regex: '(?:CFNetwork|StudioDisplay)/.+Darwin(?:/|; )(?:[\d\.]+).+(?:x86_64|i386|Power%20Macintosh)|(?:x86_64-apple-)?darwin(?:[\d\.]+)|PowerMac|com.apple.Safari.SearchHelper|^Safari'
name: 'Mac'
versions:
- regex: '(?:x86_64-apple-)?Darwin(?:/|; )?23.1.0'
version: '14.1'
- regex: '(?:x86_64-apple-)?Darwin(?:/|; )?23.0.0'
version: '14.0'
- regex: '(?:x86_64-apple-)?Darwin(?:/|; )?22.6.0'
Expand Down