Skip to content

Commit 6a78f1e

Browse files
Improves version detection for iOS, iPadOS and macOS (matomo-org#7312)
* Improves version detection for iOS * Improves version detection for macOS * Improves detection for iPadOS
1 parent 38b6448 commit 6a78f1e

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

Tests/Parser/fixtures/oss.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3630,3 +3630,43 @@
36303630
version: ""
36313631
platform: x64
36323632
family: Android
3633+
-
3634+
user_agent: Aloha/1 CFNetwork/1399 Darwin/22.1.0
3635+
os:
3636+
name: iOS
3637+
short_name: IOS
3638+
version: "16.1"
3639+
platform:
3640+
family: iOS
3641+
-
3642+
user_agent: Aloha/1 CFNetwork/1402 Darwin/22.2.0
3643+
os:
3644+
name: iOS
3645+
short_name: IOS
3646+
version: "16.2"
3647+
platform:
3648+
family: iOS
3649+
-
3650+
user_agent: Aloha/1 CFNetwork/1404 Darwin/22.3.0
3651+
os:
3652+
name: iOS
3653+
short_name: IOS
3654+
version: "16.3"
3655+
platform:
3656+
family: iOS
3657+
-
3658+
user_agent: com.apple.Safari.SearchHelper/18614.2.9.1.12 CFNetwork/1399.4 Darwin/22.1.0
3659+
os:
3660+
name: Mac
3661+
short_name: MAC
3662+
version: 13.0.1
3663+
platform:
3664+
family: Mac
3665+
-
3666+
user_agent: TuneIn Radio/24.5.0; iPad8,10; iPadOS/16.1.1
3667+
os:
3668+
name: iPadOS
3669+
short_name: IPA
3670+
version: 16.1.1
3671+
platform:
3672+
family: iOS

regexes/oss.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@
727727
name: 'iPadOS'
728728
version: '$1.$2'
729729

730-
- regex: 'iPad/(1[3-6]).(\d+[\.\d]*)'
730+
- regex: 'iPad(?:OS)?/(1[3-6]).(\d+[\.\d]*)'
731731
name: 'iPadOS'
732732
version: '$1.$2'
733733

@@ -773,6 +773,12 @@
773773
- regex: '^(?!com.apple.Safari.SearchHelper).*CFNetwork/.+ Darwin/(\d+[\.\d]+)(?!.*(?:x86_64|i386|PowerMac|Power%20Macintosh))'
774774
name: 'iOS'
775775
versions:
776+
- regex: 'Darwin/22.3.0'
777+
version: '16.3'
778+
- regex: 'Darwin/22.2.0'
779+
version: '16.2'
780+
- regex: 'Darwin/22.1.0'
781+
version: '16.1'
776782
- regex: 'Darwin/22.0.0'
777783
version: '16.0'
778784
- regex: 'Darwin/21.6.0'
@@ -982,6 +988,12 @@
982988
- regex: 'CFNetwork/.+ Darwin/(?:[\d\.]+).+(?:x86_64|i386|Power%20Macintosh)|(?:x86_64-apple-)?darwin(?:[\d\.]+)|PowerMac|com.apple.Safari.SearchHelper'
983989
name: 'Mac'
984990
versions:
991+
- regex: '(?:x86_64-apple-)?Darwin/?22.3.0'
992+
version: '13.2'
993+
- regex: '(?:x86_64-apple-)?Darwin/?22.2.0'
994+
version: '13.1'
995+
- regex: '(?:x86_64-apple-)?Darwin/?22.1.0'
996+
version: '13.0.1'
985997
- regex: '(?:x86_64-apple-)?Darwin/?22.0.0'
986998
version: '13.0'
987999
- regex: '(?:x86_64-apple-)?Darwin/?21.6.0'

0 commit comments

Comments
 (0)