Link Search Menu Expand Document

Device

public struct Device 

Properties

current

public static let current: Device 

isMultitaskingSupported

Is multitasking supported on the current device

public internal(set) var isMultitaskingSupported: Bool = true

name

The name identifyying the device

public var name: String 

systemName

The name of the operating system running on the device represented by the

public var systemName: String 

systemVersion

The current version of the operating system.

public var systemVersion: String 

model

The model of the device.

public var model: String 

localizedModel

public var localizedModel: String 

userInterfaceIdiom

The style of interface to use on the current device.

public var userInterfaceIdiom: UserInterfaceIdiom 

identifierForVendor

An alphanumeric string that uniquely identifies a device to the application vendor.

public var identifierForVendor: UUID? 

orientation

Tracking the Device Orientation

public var orientation: Device.Orientation 

isGeneratingDeviceOrientationNotifications

public private(set) var isGeneratingDeviceOrientationNotifications: Bool =
      false

isPortrait

Determining the Current Orientation

public var isPortrait: Bool 

isLandscape

public var isLandscape: Bool 

isValidIntefaceOrientation

public var isValidIntefaceOrientation: Bool 

batteryLevel

Getting the Device Battery State

public var batteryLevel: Float 

isBatteryMonitoringEnabled

public var isBatteryMonitoringEnabled: Bool = false 

batteryState

public var batteryState: Device.BatteryState 

batteryLevelDidChangeNotification

public static var batteryLevelDidChangeNotification: NSNotification.Name 

batteryStateDidChangeNotification

public static var batteryStateDidChangeNotification: NSNotification.Name 

orientationDidChangeNotification

public static var orientationDidChangeNotification: NSNotification.Name 

proximityStateDidChangeNotification

public static var proximityStateDidChangeNotification: NSNotification.Name 

Methods

beginGeneratingDeviceOrientationNotifications()

public func beginGeneratingDeviceOrientationNotifications() 

endGeneratingDeviceOrientationNotifications()

public func endGeneratingDeviceOrientationNotifications()