Skip to content

Commit

Permalink
Improves version detection for iOS and macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuconcioiu committed Apr 4, 2024
1 parent b095639 commit 98e6796
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Tests/Parser/fixtures/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4582,3 +4582,19 @@
version: "9"
platform: ""
family: Android
-
user_agent: myTuneriOS/55 CFNetwork/1496.0.1 Darwin/23.5.0
os:
name: iOS
short_name: IOS
version: "17.5"
platform: ""
family: iOS
-
user_agent: Safari/19618.2.4.11.2 CFNetwork/1496.0.1 Darwin/23.5.0
os:
name: Mac
short_name: MAC
version: "14.5"
platform: ""
family: Mac
4 changes: 4 additions & 0 deletions regexes/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,8 @@
- regex: '^(?!com\.apple\.Safari\.SearchHelper|Safari).*(?:CFNetwork|Mana)/.+ Darwin/(\d+[\.\d]+)(?!.*(?:x86_64|i386|PowerMac|Power%20Macintosh))'
name: 'iOS'
versions:
- regex: 'Darwin/23\.5\.0'
version: '17.5'
- regex: 'Darwin/23\.4\.0'
version: '17.4'
- regex: 'Darwin/23\.3\.0'
Expand Down Expand Up @@ -1260,6 +1262,8 @@
- regex: '(?:CFNetwork|Mana|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\.5\.0'
version: '14.5'
- regex: '(?:x86_64-apple-)?Darwin(?:/|; )?23\.4\.0'
version: '14.4'
- regex: '(?:x86_64-apple-)?Darwin(?:/|; )?23\.3\.0'
Expand Down

0 comments on commit 98e6796

Please sign in to comment.