From feb5682b46ddb47bf7ef80a99665cbb8ebe1e55e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rom=C3=A9n=20Rodr=C3=ADguez-Gil?= Date: Thu, 23 Sep 2021 10:34:27 +0100 Subject: [PATCH 1/2] As iOS & tvOS, watchOS apps can have ' ' or / (before the version digits) --- regexes.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regexes.yaml b/regexes.yaml index e7235e99..10fe3fc3 100644 --- a/regexes.yaml +++ b/regexes.yaml @@ -1528,7 +1528,7 @@ os_parsers: ########## # Apple Watch ########## - - regex: '(watchOS)/(\d+)\.(\d+)(?:\.(\d+)|)' + - regex: '(watchOS)[/ ](\d+)\.(\d+)(?:\.(\d+)|)' os_replacement: 'WatchOS' ########################## From 32a82ada3c727bdb2049ade77021493b3032e3a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rom=C3=A9n=20Rodr=C3=ADguez-Gil?= Date: Fri, 22 Oct 2021 12:15:55 +0100 Subject: [PATCH 2/2] Test: watchOS app w/ ' ' instead of '/' as separator --- tests/test_os.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_os.yaml b/tests/test_os.yaml index a355b6d0..5075edd6 100644 --- a/tests/test_os.yaml +++ b/tests/test_os.yaml @@ -21,6 +21,13 @@ test_cases: patch: '1' patch_minor: + - user_agent_string: 'BBCNewsUKWatchApp/4.3.0 (Watch1,2; watchOS 3.2.2)' + family: 'WatchOS' + major: '3' + minor: '2' + patch: '2' + patch_minor: + - user_agent_string: 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true' family: 'Android' major: