Structure
Device
public struct Device: SearchableResource
A device registered in your SimpleMDM account.
Relationships
Nested Types
Device.CustomAttributeValue
A custom attribute value assigned to a device.
Conforms To
Resource
A protocol adopted by all resources types of the library.
Decodable
SearchableResource
Nested Type Aliases
Initializers
init(from:)
public init(from decoder: Decoder) throws
Creates a new instance of the resource by decoding from the given decoder.
This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.
Parameters
Name | Type | Description |
---|---|---|
decoder | Decoder |
The decoder to read data from. |
Properties
uniqueIdentifier
public let uniqueIdentifier: String
An unique 40 characters long hash identifying the device.
imei
public let imei: String?
The International Mobile Equipment Identity (IMEI) number of the device.
iccid
public let iccid: String?
The Integrated Circuit Card IDentifier (ICCID) number of the device.
modelName
public let modelName: String
The displayable model name of the device (e.g. "iPad 9.7-Inch 6th Gen").
osVersion
public let osVersion: Version
The displayabled current OS version of the device (e.g. "12.0.1").
modemFirmwareVersion
public let modemFirmwareVersion: String?
The current modem firmware version of the device (e.g. "6.60.00").
carrierSettingsVersion
public let carrierSettingsVersion: String?
The current version of the settings of the cell carrier (e.g. "33.0").
availableDeviceCapacity
public let availableDeviceCapacity: Double
The available device storage capacity, in GB.
batteryLevel
public let batteryLevel: String?
The curreny battery level of the device, in percent (e.g. "76%").
currentCarrierNetwork
public let currentCarrierNetwork: String?
The current carrier network of the device.
subscriberCarrierNetwork
public let subscriberCarrierNetwork: String?
The subscriber carrier network of the device.
cellularTechnology
public let cellularTechnology: Int?
The cellular technology of the device. Signification of the value isn't documented by SimpleMDM.
voiceRoamingEnabled
public let voiceRoamingEnabled: Bool?
Whether the device allows roaming for voice.
dataRoamingEnabled
public let dataRoamingEnabled: Bool?
Whether the device allows roaming for data.
subscriberMcc
public let subscriberMcc: String?
The subscriber Mobile Contry Code (MCC) of the device.
subscriberMnc
public let subscriberMnc: String?
The subscriber Mobile Network Code (MNC) of the device.
passcodeCompliant
public let passcodeCompliant: Bool?
Whether the device's passcode is compliant with your global passcode policy.
passcodeCompliantWithProfiles
public let passcodeCompliantWithProfiles: Bool?
Whether the device's passcode is compliant with the passcode policy defined in your profiles.
filevaultEnabled
public let filevaultEnabled: Bool
Whether Filevault (disk encryption) is enabled on the device (macOS only).
filevaultRecoveryKey
public let filevaultRecoveryKey: String?
The Filevault recovery key (macOS only).
firmwarePasswordEnabled
public let firmwarePasswordEnabled: Bool
Whether the firmware of the device is password protected (macOS only?).
isDepEnrollment
public let isDepEnrollment: Bool
Whether the device is enrolled in Apple's Device Enrollment Program (DEP).
isUserApprovedEnrollment
public let isUserApprovedEnrollment: Bool?
Whether the device can be enrolled by the user (?).
isDeviceLocatorServiceEnabled
public let isDeviceLocatorServiceEnabled: Bool?
Whether the device locator service (Find my Mac / Find my iPhone) is enabled.
isDoNotDisturbInEffect
public let isDoNotDisturbInEffect: Bool?
Whether the device is currently in Do Not Disturb mode.
personalHotspotEnabled
public let personalHotspotEnabled: Bool?
Whether the device's personal hotspot functionnality is enabled.
itunesStoreAccountIsActive
public let itunesStoreAccountIsActive: Bool?
Whether the device's iTunes Store account is active.
lastCloudBackupDate
public let lastCloudBackupDate: Date?
The date of the last iCloud backup of the device.
isActivationLockEnabled
public let isActivationLockEnabled: Bool
Whether Activation Lock is enabled on the device.
isCloudBackupEnabled
public let isCloudBackupEnabled: Bool
Whether backing up to iCloud is enabled.
locationLatitude
public let locationLatitude: String?
The latitude of the device's location (in degrees, e.g. "46.23451120895299").
locationLongitude
public let locationLongitude: String?
The longitude of the device's location (in degrees, e.g. "4.273176170426797").
locationUpdatedAt
public let locationUpdatedAt: Date?
The date at which the device's location has been updated last.
deviceGroup
public let deviceGroup: RelatedToOne<DeviceGroup>
The groups the devices is a member of.
customAttributes
public let customAttributes: RelatedToManyNested<Device, CustomAttributeValue>
The custom attributes values set for this device.
endpointName
public static var endpointName: String
The remote API endpoint identifying this resource.