Device

Handles Device related requests with IMS web services. Unless otherwise specified, requests performed by this service are on the current Device.

Activate

To activate the current device for data collection, the following API can be used.

Concrete Example

let service = DeviceService()
service.activate(then: { result in
    switch result {
    case: .success(_)
        // activation successful
    case: .failure(_)
        // failure error
    }
})

Deactivate

Deactivate the current device for data collection. It may be desirable to deactivate a device if the host application's user logs out, or if the user becomes inactive.

To deactivate the current device for data collection, the following API can be used.

Concrete Example

Fetch

In order to fetch the currentDevice's model, the following API can be used.

Concrete Example

Verify And Re-Activate Device

To verify whether the current device is activated or to reactivate it if needed, please refer to the example below.

Example

Last updated