Skip to content

Commit

Permalink
feat: Add support for visionOS
Browse files Browse the repository at this point in the history
  • Loading branch information
arjankowski committed Mar 6, 2024
1 parent daffd86 commit 73e6fd8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/Requests/AnalyticsHeaderGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class AnalyticsHeaderGenerator {
return WKInterfaceDevice.current().model
#elseif os(OSX)
return "macOS"
#elseif os(visionOS)
return "visionOS"
#endif
}()

Expand All @@ -48,7 +50,7 @@ class AnalyticsHeaderGenerator {
return UIDevice.current.systemVersion
#elseif os(watchOS)
return WKInterfaceDevice.current().systemVersion
#elseif os(OSX)
#elseif os(OSX) || os(visionOS)
let version = ProcessInfo.processInfo.operatingSystemVersion
let versionString = "\(version.majorVersion).\(version.minorVersion).\(version.patchVersion)"
return versionString
Expand Down

0 comments on commit 73e6fd8

Please sign in to comment.