DeviceOfflineRules

@objc
public class DeviceOfflineRules : NSObject, InitializationStateProvider

Control how device offline checks will be evaluated.

The following demonstrates how to enable the device offline check and change the duration without connectivity which will raise the threat level.

    // Initialize rules
    var deviceOfflineRules = DeviceOfflineRules()

    // Configure the rules.
    deviceOfflineRules.minutesToMediumThreatLevel = 10
    deviceOfflineRules.minutesToHighThreatLevel = 20

    // Set the new rules.
    ManageRules.setDeviceOfflineRules(deviceOfflineRules)

    // Enable the feature.
    ManageFeatures.enableFeature(.deviceOffline)

Public properties and its accessors

  • The elapsed time in minutes without network connectivity before the threat level is raised to medium. The default value is 120 mins (2 hours).

    Declaration

    Swift

    public private(set) var minutesToMediumThreatLevel: Int { get }
  • The elapsed time in minutes without network connectivity before the threat level is raised to high. The default value is 240 mins (4 hours).

    Declaration

    Swift

    public private(set) var minutesToHighThreatLevel: Int { get }