Device

public class Device : ModelObject

Representation of a device the app is running on.

Remark

This class can only be initialized once per server. Use the factory method deviceForServer(_:) to get an already created instance or create one if there is no device object instance created already.
  • Device name

    Declaration

    Swift

    @objc
    public internal(set) dynamic var deviceName: String { get }
  • Device ID

    Declaration

    Swift

    @objc
    public internal(set) dynamic var deviceId: String { get }
  • Server device ID

    Declaration

    Swift

    @objc
    public internal(set) dynamic var serverDeviceId: String? { get }
  • Device’s system name

    Declaration

    Swift

    @objc
    public internal(set) dynamic var systemName: String { get }
  • Device model

    Declaration

    Swift

    @objc
    public internal(set) dynamic var model: String? { get }
  • The Apple’s push notification token associated with the device.

    Declaration

    Swift

    @objc
    public internal(set) dynamic var apnsToken: String? { get }
  • Boolean indicating whether the Device instance is the current device the app is running on.

    Declaration

    Swift

    @objc
    public private(set) dynamic var isCurrentDevice: Bool { get }
  • Undocumented

    Declaration

    Swift

    var privateKeyTag: String { get }
  • Undocumented

    Declaration

    Swift

    var publicKeyTag: String { get }
  • Undocumented

    Declaration

    Swift

    var deviceCertificateTag: String { get }
  • Undocumented

    Declaration

    Swift

    var deviceCertificate: SecCertificate? { get }
  • Undocumented

    Declaration

    Swift

    var deviceCertificatePEM: String? { get }
  • Undocumented

    Declaration

    Swift

    var deviceIdentity: SecIdentity? { get }
  • Undocumented

    Declaration

    Swift

    var privateKey: SecKey? { get }
  • Undocumented

    Declaration

    Swift

    var publicKey: SecKey? { get }
  • Undocumented

    Declaration

    Swift

    var certificateSigningRequest: SecCertificateSigningRequest? { get }
  • Undocumented

    Declaration

    Swift

    static func saveBLEAdvData(_ string: String, to device: Device)
  • Fetches the device object associated with a server or creates a new one if none exists.

    Declaration

    Swift

    public static func deviceForServer(_ server: Server?) -> Device?
    Parameters
    server

    Server instance.

    Return Value

    A Device object.

  • Undocumented

    Declaration

    Swift

    class func setTestingDevice(_ device: Device, forServer server: Server)
  • Undocumented

    Declaration

    Swift

    class func deleteTestingDevices()
  • Undocumented

    Declaration

    Swift

    func setDeviceCertificateData(_ certData: Data?)