Repository: matomo-org/device-detector (language: php)

Issue:
Add detection of BytedanceWebview
- [x] Mozilla/5.0 (iPhone; CPU iPhone OS 18_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 aweme_31.9.0 Region/CN AppTheme/light NetType/WIFI JsSdk/2.0 Channel/App ByteLocale/zh ByteFullLocale/zh-Hans-CN WKWebView/1 Bullet/1 aweme/31.9.0 BulletTag/C4F7B8CE-DCC0-492D-934F-923A3909D158 BytedanceWebview/d8a21c6 FalconTag/D8105CFD-2385-4C85-AB6C-7A3DF31B9ACE


Discussion / hints:
The Douyin (Chinese version of TikTok) use `BytedanceWebview`. Maybe other apps under ByteDance Ltd. also use `BytedanceWebview`.

Fix patch:
diff --git a/Tests/Parser/Client/fixtures/mobile_app.yml b/Tests/Parser/Client/fixtures/mobile_app.yml
index 221ba805f5..34d7c3b618 100644
--- a/Tests/Parser/Client/fixtures/mobile_app.yml
+++ b/Tests/Parser/Client/fixtures/mobile_app.yml
@@ -2219,3 +2219,87 @@
     type: mobile app
     name: TopSecret Chat
     version: 1.2.0
+-
+  user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 18_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 aweme_31.9.0 Region/CN AppTheme/light NetType/WIFI JsSdk/2.0 Channel/App ByteLocale/zh ByteFullLocale/zh-Hans-CN WKWebView/1 Bullet/1 aweme/31.9.0 BulletTag/C4F7B8CE-DCC0-492D-934F-923A3909D158 BytedanceWebview/d8a21c6 FalconTag/D8105CFD-2385-4C85-AB6C-7A3DF31B9ACE
+  client:
+    type: mobile app
+    name: Douyin
+    version: 31.9.0
+-
+  user_agent: Mozilla/5.0 (Linux; Android 10; HD1900 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/75.0.3770.156 Mobile Safari/537.36 aweme_230400 JsSdk/1.0 NetType/WIFI AppName/aweme app_version/23.4.0 ByteLocale/zh-CN Region/CN AppSkin/white AppTheme/light BytedanceWebview/d8a21c6 WebView/075113004008
+  client:
+    type: mobile app
+    name: Douyin
+    version: 23.4.0
+-
+  user_agent: Mozilla/5.0 (Linux; Android 8.1.0; Twist Tab Build/OC; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/70.0.3538.110 Safari/537.36trill_400 JsSdk/1.0 NetType/WIFI Channel/googleplay AppName/musically_go app_version/4.0.0 ByteLocale/pt-BR Region/BR
+  client:
+    type: mobile app
+    name: TikTok Lite
+    version: 4.0.0
+-
+  user_agent: Mozilla/5.0 (Linux; Android 11; SM-A107M Build/RP1A.200720.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.100 Mobile Safari/537.36 Yoda/oversea-3.1.1-rc6-cache ISDR/0 Kwai_Pro/10.9.10.537204 NetScore/53 NST/F deviceScore/16 webviewPreloaded/false WebViewPreAlloc/1 StatusHT/32 TitleHT/50 NetType/WIFI ISLP/1 ISDM/0 ISLB/0 locale/pt-br evaSupported/false kwaiPixelAd
+  client:
+    type: mobile app
+    name: Kwai Pro
+    version: 10.9.10.537204
+-
+  user_agent: Mozilla/5.0 (iPad; CPU OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Kwai/12.9.10.8962 ISLP/0 StatusHT/24 KDT/PAD ISDM/1 TitleHT/44 NetType/WIFI ICFO/0 locale/zh-Hans CT/0 Yoda/3.0.3.1 ISLB/0 CoIS/0 ISLM/0 WebViewType/WK BHT/50 AZPREFIX/az2
+  client:
+    type: mobile app
+    name: Kwai
+    version: 12.9.10.8962
+-
+  user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 17_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Sooplive Webview/8.0.4 device_id=f55b74fd2f6a7dfa83e52512038c7053; adid=ADID_DISABLED;
+  client:
+    type: mobile app
+    name: SOOP
+    version: 8.0.4
+-
+  user_agent: GoEuroAndroid/9.39.3 (Realme RMX3366; Android 14; okhttp/4.9.3) WebView
+  client:
+    type: mobile app
+    name: GoEuro
+    version: 9.39.3
+-
+  user_agent: GoEuroIOS /9.41.0 (iPhone; iOS 17.5.1; Scale/2.00) WebView
+  client:
+    type: mobile app
+    name: GoEuro
+    version: 9.41.0
+-
+  user_agent: 'Mozilla/5.0 (Linux; Android 8.1.0; CPH1901 Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.120 Mobile Safari/537.36  trill_200005 JsSdk/1.0 NetType/WIFI Channel/googleplay AppName/trill app_version/20.0.5 ByteLocale/id-ID ByteFullLocale/id-ID Region/ID BytedanceWebview/d8a21c6'
+  client:
+    type: mobile app
+    name: TikTok
+    version: 20.0.5
+-
+  user_agent: Mozilla/5.0 (Linux; Android 8.1.0; CPH1909 Build/O11019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/70.0.3538.110 Mobile Safari/537.36 Channel/release AppName/ultralite app_version/26.4.4 Region/EG ByteLocale/ar ByteFullLocale/ar
+  client:
+    type: mobile app
+    name: TikTok Lite
+    version: 26.4.4
+-
+  user_agent: iOS 16.3.1, iPhone, BOOM v12.6.98, webview
+  client:
+    type: mobile app
+    name: Boom360
+    version: 12.6.98
+-
+  user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 18_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 WebViewApp WallaNews/9.8.2/IOS
+  client:
+    type: mobile app
+    name: Walla News
+    version: 9.8.2
+-
+  user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_7_10 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 WebViewApp TRP_iPhone_App/8.0.3
+  client:
+    type: mobile app
+    name: TRP Retail Locator
+    version: 8.0.3
+-
+  user_agent: Mozilla/5.0 (iPad; CPU OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 WebViewApp Townnews-Now/4.0
+  client:
+    type: mobile app
+    name: TownNews Now
+    version: "4.0"
diff --git a/regexes/client/mobile_apps.yml b/regexes/client/mobile_apps.yml
index a3418be347..ba410c9311 100644
--- a/regexes/client/mobile_apps.yml
+++ b/regexes/client/mobile_apps.yml
@@ -553,13 +553,23 @@
   version: '$1'
 
 # TikTok (https://apps.apple.com/app/id835599320 | https://play.google.com/store/apps/details?id=com.zhiliaoapp.musically)
-- regex: 'AppName/musical_ly app_version/(\d+\.(?:[.\d]+))?'
+- regex: 'AppName/(?:musical_ly|trill) app_version/([\d.]+)'
   name: 'TikTok'
   version: '$1'
 - regex: '(?:TikTok[/ ]|com\.zhiliaoapp\.musically|musical_ly_|trill_)(\d+\.(?:[.\d]+))?'
   name: 'TikTok'
   version: '$1'
 
+# TikTok Lite (https://play.google.com/store/apps/details?id=com.zhiliaoapp.musically.go)
+- regex: '(?:musically_go|ultralite) app_version/([\d.]+)'
+  name: 'TikTok Lite'
+  version: '$1'
+
+# Douyin (https://apps.apple.com/cn/app/%E6%8A%96%E9%9F%B3/id1142110895 | https://play.google.com/store/apps/details?id=com.ss.android.ugc.aweme.mobile)
+- regex: 'aweme(?: app_version)?/([\d.]+)'
+  name: 'Douyin'
+  version: '$1'
+
 # https://apps.apple.com/app/id1026349850
 - regex: 'Copied/(\d+[.\d]+) CFNetwork'
   name: 'Copied'
@@ -2570,6 +2580,46 @@
   name: 'TopSecret Chat'
   version: '$1'
 
+# Kwai (https://play.google.com/store/apps/details?id=com.kwai.video)
+- regex: 'Kwai/([\d.]+)'
+  name: 'Kwai'
+  version: '$1'
+
+# Kwai Pro
+- regex: 'Kwai_Pro/([\d.]+)'
+  name: 'Kwai Pro'
+  version: '$1'
+
+# SOOP (https://www.sooplive.com/)
+- regex: 'Sooplive Webview/([\d.]+)'
+  name: 'SOOP'
+  version: '$1'
+
+# GoEuro
+- regex: 'GoEuro(?:Android|IOS )/([\d.]+)'
+  name: 'GoEuro'
+  version: '$1'
+
+# Boom360 (https://apps.apple.com/en/app/boom360/id1546629853)
+- regex: 'BOOM v([\d.]+)'
+  name: 'Boom360'
+  version: '$1'
+
+# Walla News (https://apps.apple.com/us/app/%D7%95%D7%95%D7%90%D7%9C%D7%94/id336751384)
+- regex: 'WallaNews/([\d.]+)'
+  name: 'Walla News'
+  version: '$1'
+
+# TRP Retail Locator (https://apps.apple.com/us/app/trp-retailer-locator/id628141493)
+- regex: 'TRP_iPhone_App/([\d.]+)'
+  name: 'TRP Retail Locator'
+  version: '$1'
+
+# TownNews Now (https://apps.apple.com/us/app/townnews-now/id1434301627)
+- regex: 'Townnews-Now/([\d.]+)'
+  name: 'TownNews Now'
+  version: '$1'
+
 # Electron generic apps
 - regex: ' (?!(?:AppleWebKit|brave|Cypress|Franz|Mailspring|Notion|Basecamp|Evernote|catalyst|ramboxpro|BlueMail|BeakerBrowser|Dezor|TweakStyle|Colibri|Polypane|Singlebox|Skye|VibeMate|(?:d|LT|Glass|Sushi|Flash|OhHai)Browser|Sizzy))([a-z0-9]*)(?:-desktop|-electron-app)?/(\d+\.[\d.]+).*Electron/'
   name: '$1'


Test patch: