Threat

@objc
public class Threat : NSObject, InitializationStateProvider

Interface for retrieving threat details for a specific threat type.

This is an abstract class and it shoud not be used directly. Create your own subclass to use the functionality of this class.

  • The specific type of threat being checked

    This property should be overriden in child classes

    Declaration

    Swift

    public var type: Result<ThreatType, Error> { get }
  • A timestamp of when the threat was last evaluated. For example, when a device scan was last completed.

    The returned value is a UNIX timestamp in milliseconds of when the check last ran.

    The result is 0 if checks have not yet been performed, for example after runtime has just been installed.

    The result is -1 if some error has been occured.

    Declaration

    Swift

    public var evaluatedTime: Result<Int, Error> { get }
  • The level of risk posed by the threat.

    Declaration

    Swift

    public var riskLevel: Result<ThreatLevel, Error> { get }
  • A Boolean value indicating whether the threat is being evaluated by the runtime.

    If detection is disabled you can enable it by using ManageFeatures.enableFeature(for:).

    Declaration

    Swift

    public var isDetectionEnabled: Result<Bool, Error> { get }
  • The information on possible remediation actions to the threat.

    Declaration

    Swift

    public var info: Result<String?, Error> { get }