diff --git a/Sources/TelemetryClient/SignalManager.swift b/Sources/TelemetryClient/SignalManager.swift index 37ac4c6..d4a3732 100644 --- a/Sources/TelemetryClient/SignalManager.swift +++ b/Sources/TelemetryClient/SignalManager.swift @@ -1,6 +1,6 @@ import Foundation -#if os(iOS) +#if os(iOS) || os(xrOS) import UIKit #elseif os(macOS) import AppKit @@ -203,7 +203,7 @@ private extension SignalManager { var defaultUserIdentifier: String { guard configuration.defaultUser == nil else { return configuration.defaultUser! } - #if os(iOS) || os(tvOS) + #if os(iOS) || os(tvOS) || os(xrOS) return UIDevice.current.identifierForVendor?.uuidString ?? "unknown user \(DefaultSignalPayload.systemVersion) \(DefaultSignalPayload.buildNumber)" #elseif os(watchOS) if #available(watchOS 6.2, *) { diff --git a/Tests/TelemetryClientTests/SignalPayloadTests.swift b/Tests/TelemetryClientTests/SignalPayloadTests.swift index 72fa45c..baed205 100644 --- a/Tests/TelemetryClientTests/SignalPayloadTests.swift +++ b/Tests/TelemetryClientTests/SignalPayloadTests.swift @@ -75,6 +75,8 @@ final class DefaultSignalPayloadTests: XCTestCase { expectedResult = "tvOS" #elseif os(Linux) expectedResult = "Linux" + #elseif os(xrOS) + expectedResult = "VisionOS" #else return "Unknown Operating System" #endif