Instance Method

operatingSystem()

Returns a constant to indicate the operating system on which the process is executing.

Declaration

func operatingSystem() -> Int

Return Value

Operating system identifier. See Constants for a list of possible values. In macOS, it’s NSMACHOperatingSystem.

See Also

Getting Host Information

var hostName: String

The name of the host computer on which the process is executing.

func operatingSystemName() -> String

Returns a string containing the name of the operating system on which the process is executing.

Deprecated
var operatingSystemVersionString: String

A string containing the version of the operating system on which the process is executing.

var operatingSystemVersion: OperatingSystemVersion

The version of the operating system on which the process is executing.

func isOperatingSystemAtLeast(OperatingSystemVersion) -> Bool

Returns a Boolean value indicating whether the version of the operating system on which the process is executing is the same or later than the given version.