File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Packages/ClientRuntime/Sources/Util Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ //
2
+ // Copyright Amazon.com Inc. or its affiliates.
3
+ // All Rights Reserved.
4
+ //
5
+ // SPDX-License-Identifier: Apache-2.0
6
+ //
7
+
8
+ #if os(iOS) || os (watchOS) || os(macOS) || os(tvOS)
9
+ import Foundation. NSProcessInfo
10
+
11
+ public struct PlatformOperationSystemVersion {
12
+ static public func operatingSystemVersion( ) -> String ? {
13
+ let osVersion = ProcessInfo . processInfo. operatingSystemVersion
14
+ return " \( osVersion. majorVersion) . \( osVersion. minorVersion) . \( osVersion. patchVersion) "
15
+ }
16
+ }
17
+ #else
18
+ // TODO: Implement for Linux & Windows
19
+ public struct PlatformOperationSystemVersion {
20
+ static public func operatingSystemVersion( ) -> String ? {
21
+ return nil
22
+ }
23
+ }
24
+ #endif
You can’t perform that action at this time.
0 commit comments