SimpleMDM-Swift Documentation

Structure Device

public struct Device: SearchableResource  

A device registered in your SimpleMDM account.

%7 Device Device Resource Resource Device->Resource SearchableResource SearchableResource Device->SearchableResource Decodable Decodable Device->Decodable

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

ID

public typealias ID = Int

The type of the unique identifier of this resource.

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

decoder Decoder

The decoder to read data from.

Properties

id

public let id: ID

The unique identifier of this resource.

unique​Identifier

public let uniqueIdentifier: String

An unique 40 characters long hash identifying the device.

serial​Number

public let serialNumber: String

The serial number of the device.

imei

public let imei: String? 

meid

public let meid: String? 

The Mobile Equipment IDentifier (MEID) number of the device.

iccid

public let iccid: String? 

The Integrated Circuit Card IDentifier (ICCID) number of the device.

name

public let name: String

The name you've given to the device in the SimpleMDM interface.

device​Name

public let deviceName: String

The name set in the device's settings.

last​Seen​At

public let lastSeenAt: Date

Date at which the device last communicated with SimpleMDM.

status

public let status: String

The current MDM status of the device (e.g. "enrolled").

model​Name

public let modelName: String

The displayable model name of the device (e.g. "iPad 9.7-Inch 6th Gen").

model

public let model: String

The Apple model identifier of the device (e.g. "MR7F2NF").

product​Name

public let productName: String

The Apple product name of the device (e.g. "iPad7,5").

os​Version

public let osVersion: Version

The displayabled current OS version of the device (e.g. "12.0.1").

build​Version

public let buildVersion: String

The current build version of the OS (e.g. "16A404").

modem​Firmware​Version

public let modemFirmwareVersion: String? 

The current modem firmware version of the device (e.g. "6.60.00").

carrier​Settings​Version

public let carrierSettingsVersion: String? 

The current version of the settings of the cell carrier (e.g. "33.0").

device​Capacity

public let deviceCapacity: Double

The total device storage capacity, in GB.

available​Device​Capacity

public let availableDeviceCapacity: Double

The available device storage capacity, in GB.

battery​Level

public let batteryLevel: String? 

The curreny battery level of the device, in percent (e.g. "76%").

bluetooth​Mac

public let bluetoothMac: String

The bluetooth MAC address of the device.

wifi​Mac

public let wifiMac: String

The wifi MAC address of the device.

current​Carrier​Network

public let currentCarrierNetwork: String? 

The current carrier network of the device.

sim​Carrier​Network

public let simCarrierNetwork: String? 

The SIM carrier network of the device.

subscriber​Carrier​Network

public let subscriberCarrierNetwork: String? 

The subscriber carrier network of the device.

phone​Number

public let phoneNumber: String? 

The phone number

cellular​Technology

public let cellularTechnology: Int? 

The cellular technology of the device. Signification of the value isn't documented by SimpleMDM.

voice​Roaming​Enabled

public let voiceRoamingEnabled: Bool? 

Whether the device allows roaming for voice.

data​Roaming​Enabled

public let dataRoamingEnabled: Bool? 

Whether the device allows roaming for data.

is​Roaming

public let isRoaming: Bool? 

Whether the device is currently roaming.

subscriber​Mcc

public let subscriberMcc: String? 

The subscriber Mobile Contry Code (MCC) of the device.

subscriber​Mnc

public let subscriberMnc: String? 

The subscriber Mobile Network Code (MNC) of the device.

simmcc

public let simmcc: String? 

The SIM Mobile Contry Code (MCC) of the device.

simmnc

public let simmnc: String? 

The SIM Mobile Network Code (MNC) of the device.

current​Mcc

public let currentMcc: String? 

The current Mobile Contry Code (MCC) of the device.

current​Mnc

public let currentMnc: String? 

The current Mobile Network Code (MNC) of the device.

hardware​Encryption​Caps

public let hardwareEncryptionCaps: Int? 

Not documented by SimpleMDM.

passcode​Present

public let passcodePresent: Bool? 

Whether the device is passcode protected.

passcode​Compliant

public let passcodeCompliant: Bool? 

Whether the device's passcode is compliant with your global passcode policy.

passcode​Compliant​With​Profiles

public let passcodeCompliantWithProfiles: Bool? 

Whether the device's passcode is compliant with the passcode policy defined in your profiles.

filevault​Enabled

public let filevaultEnabled: Bool

Whether Filevault (disk encryption) is enabled on the device (macOS only).

filevault​Recovery​Key

public let filevaultRecoveryKey: String? 

The Filevault recovery key (macOS only).

firmware​Password​Enabled

public let firmwarePasswordEnabled: Bool

Whether the firmware of the device is password protected (macOS only?).

firmware​Password

public let firmwarePassword: String? 

The firmware password (macOS only?).

is​Supervised

public let isSupervised: Bool? 

Whether the device is supervised.

is​Dep​Enrollment

public let isDepEnrollment: Bool

Whether the device is enrolled in Apple's Device Enrollment Program (DEP).

is​User​Approved​Enrollment

public let isUserApprovedEnrollment: Bool? 

Whether the device can be enrolled by the user (?).

is​Device​Locator​Service​Enabled

public let isDeviceLocatorServiceEnabled: Bool? 

Whether the device locator service (Find my Mac / Find my iPhone) is enabled.

is​DoNot​Disturb​InEffect

public let isDoNotDisturbInEffect: Bool? 

Whether the device is currently in Do Not Disturb mode.

personal​Hotspot​Enabled

public let personalHotspotEnabled: Bool? 

Whether the device's personal hotspot functionnality is enabled.

itunes​Store​Account​IsActive

public let itunesStoreAccountIsActive: Bool? 

Whether the device's iTunes Store account is active.

last​Cloud​Backup​Date

public let lastCloudBackupDate: Date? 

The date of the last iCloud backup of the device.

is​Activation​Lock​Enabled

public let isActivationLockEnabled: Bool

Whether Activation Lock is enabled on the device.

is​Cloud​Backup​Enabled

public let isCloudBackupEnabled: Bool

Whether backing up to iCloud is enabled.

location​Latitude

public let locationLatitude: String? 

The latitude of the device's location (in degrees, e.g. "46.23451120895299").

location​Longitude

public let locationLongitude: String? 

The longitude of the device's location (in degrees, e.g. "4.273176170426797").

location​Accuracy

public let locationAccuracy: Int? 

The accuracy of the device's location.

location​Updated​At

public let locationUpdatedAt: Date? 

The date at which the device's location has been updated last.

device​Group

public let deviceGroup: RelatedToOne<DeviceGroup>

The groups the devices is a member of.

custom​Attributes

public let customAttributes: RelatedToManyNested<Device, CustomAttributeValue>

The custom attributes values set for this device.

endpoint​Name

public static var endpointName: String  

The remote API endpoint identifying this resource.