ManageFeatures

@objc
public class ManageFeatures : NSObject, InitializationStateProvider

The class controls the configuration of security features in the runtime.

  • Check whether a specific security threat will be detected by the runtime. By default, all features are enabled.

    Throws

    invalidInitializationState indicating that lib is incorrect state to use this API

    Declaration

    Swift

    public static func featureStatus(of threatType: ThreatType) throws -> FeatureStatus

    Parameters

    threatType

    The type of threat to retrieve status for.

    Return Value

    A feature status for the requested threat type.

  • Enable a specific security feature of the library.

    By default, all threat types are enabled and any threats detected can be monitored using the ThreatStatus interface.

    However if a specific feature has been manually disabled, call this method to re-enable it.

    Throws

    invalidInitializationState indicating that lib is incorrect state to use this API

    Declaration

    Swift

    public static func enableFeature(_ threatType: ThreatType) throws -> Bool

    Parameters

    threatType

    The type of threat to be enabled.

    Return Value

    true if the feature was enabled, otherwise false.

  • Prevent a specific threat type from being detected by the library.

    To prevent being notified of specific threat type and disable the relevant checks, call this method indicating the ThreatType you wish to disable.

    For example, to disable checking the integrity of a device, pass the deviceSecurity when using the method.

    Throws

    invalidInitializationState indicating that lib is incorrect state to use this API

    Declaration

    Swift

    public static func disableFeature(_ threatType: ThreatType) throws -> Bool

    Parameters

    threatType

    The type of threat to be disabled.

    Return Value

    true if the feature was disabled, otherwise false.