Ignore OS version from web based sessions (PSG-826) (#6852)

* Ignore OS version from web based sessions

* Add changelog
This commit is contained in:
ismailgulek
2022-10-11 14:39:36 +03:00
committed by GitHub
parent d6ae7aefd2
commit f6a0208bd5
5 changed files with 15 additions and 16 deletions
@@ -132,11 +132,9 @@ enum UserAgentParser {
if deviceInfoComponents[safe: 1]?.hasPrefix("Android") == true {
deviceOS = deviceInfoComponents[safe: 1]
} else if deviceInfoComponents.first == "Macintosh" {
var osFull = deviceInfoComponents[safe: 1]
osFull = osFull?.replacingOccurrences(of: "Intel ", with: "")
osFull = osFull?.replacingOccurrences(of: "Mac OS X", with: "macOS")
osFull = osFull?.replacingOccurrences(of: "_", with: ".")
deviceOS = osFull
deviceOS = "macOS"
} else if deviceInfoComponents.first?.hasPrefix("Windows") == true {
deviceOS = "Windows"
} else {
deviceOS = deviceInfoComponents.first
}