Other SDK Customizations

Check device information and status

You can use the getDevice method to get the information that the SDK has recorded regarding the device.

The callback of this method will receive as a parameter the device object that contains all the information associated with the device.

Indigitall.getDeviceWith(onSuccess: { (device) in
        print("Device: \(device.deviceID ?? "")\nStatus: \(device.enabled ?? false)")
    }, onError: { (error) in
        print("Error: \(error.message)")
    })
[Indigitall getDeviceWithOnSuccess:^(INDevice * _Nonnull device) {
        NSLog(@"DEVICE: %@ \nStatus: %d", device.deviceID, device.enabled);
    } onError:^(INError * _Nonnull error) {
        NSLog(@"ERROR: %@", error.message);
    }];

Enable/disable device

You can choose to disable the device to block the receipt of notifications. It is a very useful method to:

  • Implement a preferences screen so that the user can enable / disable the receipt of notifications.
  • Avoid receiving notifications if the user has not logged in, or has not accepted the terms of use, etc.
  • Manage the Robinson List.

To do this, you have the enableDevice and disableDevice methods.

The callback of these methods will receive as a parameter the device object that contains all the information associated with the device.

Indigitall.enableDeviceWith(onSuccess: { (device) in
        print("Device: \(device.deviceID ?? "")\nStatus: \(device.enabled ?? false)")
    }, onError: { (error) in
        print("Error: \(error.message)")
    })

Indigitall.disableDeviceWith(onSuccess: { (device) in
        print("Device: \(device.deviceID ?? "")\nStatus: \(device.enabled ?? false)")
    }) { (error) in
        print("Error: \(error.message)")
    }
[Indigitall enableDeviceWithOnSuccess:^(INDevice * _Nonnull device) {
        NSLog(@"Device: %@ \nStatus: %d",device.deviceID,device.enabled);
    } onError:^(INError * _Nonnull error) {
        NSLog(@"ERROR: %@", error.message);
    }];

[Indigitall disableDeviceWithOnSuccess:^(INDevice * _Nonnull device) {
        NSLog(@"Device: %@ \nStatus: %d",device.deviceID,device.enabled);
    } onError:^(INError * _Nonnull error) {
        NSLog(@"ERROR: %@", error.message);
    }];