Skip to content

Commit

Permalink
Improves detection for Android, iOS, macOS and Windows (#7591)
Browse files Browse the repository at this point in the history
* Improves detection for Android
* Improves detection for iOS
* Improves detection for Windows
* Improves detection for macOS
* Improve regex for macOS
  • Loading branch information
liviuconcioiu authored Feb 16, 2024
1 parent 14a8051 commit 3071175
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 4 deletions.
40 changes: 40 additions & 0 deletions Tests/Parser/fixtures/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4190,3 +4190,43 @@
version: "14.6"
platform:
family: iOS
-
user_agent: WhatsApp/2.22.9.78 A
os:
name: Android
short_name: AND
version: ""
platform: ""
family: Android
-
user_agent: GBWhatsApp/2.22.10.73 A
os:
name: Android
short_name: AND
version: ""
platform: ""
family: Android
-
user_agent: WhatsApp/2.22.9.76 i
os:
name: iOS
short_name: IOS
version: ""
platform: ""
family: iOS
-
user_agent: WhatsApp/2.2349.2 W
os:
name: Windows
short_name: WIN
version: ""
platform: ""
family: Windows
-
user_agent: WhatsApp/2.2214.12 N
os:
name: Mac
short_name: MAC
version: ""
platform: ""
family: Mac
8 changes: 4 additions & 4 deletions regexes/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@
name: 'Android'
version: '$1'

- regex: 'BeyondPod|AntennaPod|Podkicker|DoggCatcher|Player FM|okhttp|Podcatcher Deluxe|Sonos/.+\(ACR_|Linux x86_64; Quest'
- regex: 'BeyondPod|AntennaPod|Podkicker|DoggCatcher|Player FM|okhttp|Podcatcher Deluxe|Sonos/.+\(ACR_|Linux x86_64; Quest|.*WhatsApp/.*A$'
name: 'Android'
version: ''

Expand Down Expand Up @@ -723,7 +723,7 @@
name: 'Windows'
version: '$1'

- regex: 'mingw32|winhttp'
- regex: 'mingw32|winhttp|WhatsApp/.*W$'
name: 'Windows'
version: ''

Expand Down Expand Up @@ -1085,7 +1085,7 @@
name: 'iOS'
version: '$1'

- regex: '(?:Podcasts/(?:[\d\.]+)|Instacast(?:HD)?/(?:\d\.[\d\.abc]+)|Pocket Casts, iOS|\(iOS\)|iOS; Opera|Overcast|Castro|Podcat|iCatcher|RSSRadio/|MobileSafari/)(?!.*x86_64)'
- regex: '(?:Podcasts/(?:[\d\.]+)|Instacast(?:HD)?/(?:\d\.[\d\.abc]+)|Pocket Casts, iOS|\(iOS\)|iOS; Opera|Overcast|Castro|Podcat|iCatcher|RSSRadio/|MobileSafari/|WhatsApp/.*i$)(?!.*x86_64)'
name: 'iOS'
version: ''

Expand Down Expand Up @@ -1306,7 +1306,7 @@
name: 'Mac'
version: '$1'

- regex: 'Darwin|Macintosh|Mac_PowerPC|PPC|Mac PowerPC|iMac|MacBook|macOS|AppleExchangeWebServices|com.apple.trustd|Sonos/.+\(MDCR_'
- regex: 'Darwin|Macintosh|Mac[ _]PowerPC|PPC|iMac|MacBook|macOS|AppleExchangeWebServices|com.apple.trustd|Sonos/.+\(MDCR_|WhatsApp/.*N$'
name: 'Mac'
version: ''

Expand Down

0 comments on commit 3071175

Please sign in to comment.