From 2122379c603ec47618df0faba2fe4e671365d042 Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Thu, 7 Aug 2025 12:39:29 +0100 Subject: [PATCH] Label rageshakes from macOS and report the right operating system. (#4392) --- .../Sources/Services/BugReport/BugReportService.swift | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ElementX/Sources/Services/BugReport/BugReportService.swift b/ElementX/Sources/Services/BugReport/BugReportService.swift index 781a43d26..cf7b011f0 100644 --- a/ElementX/Sources/Services/BugReport/BugReportService.swift +++ b/ElementX/Sources/Services/BugReport/BugReportService.swift @@ -91,6 +91,10 @@ class BugReportService: NSObject, BugReportServiceProtocol { bugReport.githubLabels.append("Nightly") } + if ProcessInfo.processInfo.isiOSAppOnMac { + bugReport.githubLabels.append("macOS") + } + for label in bugReport.githubLabels { params.append(MultipartFormData(key: "label", type: .text(value: label))) } @@ -191,7 +195,12 @@ class BugReportService: NSObject, BugReportServiceProtocol { } private var os: String { - "\(UIDevice.current.systemName) \(UIDevice.current.systemVersion)" + if ProcessInfo.processInfo.isiOSAppOnMac { + // The other APIs report macOS's equivalent iOS version, so lets use the right one to get the macOS version. + "macOS \(ProcessInfo.processInfo.operatingSystemVersionString)" + } else { + "\(UIDevice.current.systemName) \(UIDevice.current.systemVersion)" + } } private func zipFiles(_ logFiles: [URL]) async -> Logs {