Configuration

Control which features are enabled and adjust the rules on how specific checks operate.

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

    See more

    Declaration

    Swift

    @objc
    public class ManageFeatures : NSObject, InitializationStateProvider
  • Class to manage the behavior of specific security features.

    See more

    Declaration

    Swift

    @objc
    public class ManageRules : NSObject, InitializationStateProvider
  • Configure how ContentChecker performs checks.

    Content checked using the Content Checker interface is by default configured to send the URL, IP address or message to the BlackBerry Cloud for verification. Advanced machine-learning capabilities and accumulated knowledge from threat intelligence feeds are used to provide an instant assessment of the safety of the content.

    Use this class to configure additional custom allowlists and denylists to evaluate when checking URLs or IP addresses. Alternatively, opt to evaluate content using a recent threat detection model running locally on the device. Using the on-device model prevents the need to make networking requests to the BlackBerry Cloud.

    Configure a Custom Allowlist or Denylist

    To evaluate content against a custom allowlist and denylist, use the appropriate properties to configure a list of URLs or IP addresses. IP addresses maybe be defined as either IPv4 or IPv6.

    Configure On-device Check

    To configure content checks to only use the BlackBerry Protect on-device threat model, use setSafeMessagingCheckType(_:) or setSafeBrowsingCheckType(_:) with the check type set to onDevice.

    See more

    Declaration

    Swift

    @objc
    public class ContentCheckerRules : NSObject
    extension ContentCheckerRules: NSCopying
  • 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)
    
    See more

    Declaration

    Swift

    @objc
    public class DeviceOfflineRules : NSObject, InitializationStateProvider
  • Control which device security checks will be evaluated.

    Control which device security checks will be evaluated when the application launches and when checkDeviceSecurity() is called.

    The following demonstrates how to only enable jailbreak detection:

        // Initialize rules
        var deviceSecurityRules = DeviceSecurityRules(featureStatus: .disabled)
    
        // Enable jailbreak detection.
        deviceSecurityRules = deviceSecurityRule.enableCheck(.jailbreakDetection)
    
        // Set the new rules.
        ManageRules.setDeviceSecurityRules(deviceSecurityRules)
    
    See more

    Declaration

    Swift

    @objc
    public class DeviceSecurityRules : NSObject, InitializationStateProvider
  • Enumeration of security checks which can be performed on the device.

    Use setDeviceSecurityRules(_:) to control which of the following security features will be evaluated.

    See more

    Declaration

    Swift

    @objc
    public enum DeviceSecurityCheck : Int, CaseIterable
  • Enumeration of the enforcement actions which can be performed when a threat is detected.

    For all checks except debugDetection the runtime will provide a threat status notification. It is only possible to configure the runtime to terminate immediately when a debugger is attached to the application process.

    See more

    Declaration

    Swift

    @objc
    public enum DeviceSecurityEnforcementAction : Int, CaseIterable
  • Configures the minimum OS version and any restricted devices required by your application.

    The following is example of how to configure iOS 12 as the minimum operating system and exclude Apple Silicon Macs:

        let deviceSoftwareRules = try! DeviceSoftwareRules.init(minimumOSVersion: "12.0",
                                                                blacklistedModels: [DeviceSoftwareRules.iOSDeviceModelType.AppleSiliconMac],
                                                                enableDeviceSoftwareCheck: true)
    
    See more

    Declaration

    Swift

    @objc
    public class DeviceSoftwareRules : NSObject, InitializationStateProvider
  • Specify a set of password requirements to check via checkPasswordStrength(_:)

    Default values

    In the absence of a custom rule set, password strength checking operates on the basis of a minimum length of 6 characters, containing at least one upper case character and one digit.

    Creating a custom rule

    A custom rule can be created in two ways:

    • directly as a PasswordStrengthRules object, in which case the rule is created with all checks disabled
    • via getPasswordStrengthRules(), in which case the rule is created with the current settings, which can then be modified

    Setting the rule

    For example, to apply only the rule elements you wish to specify:-

        // create a rules object
        let rules = PasswordStrengthRules()
        rules.setMinimumLength(6)
    
        // set the rules
        ManageRules.setPasswordStrengthRules(rules)
    
    See more

    Declaration

    Swift

    @objc
    public class PasswordStrengthRules : NSObject, InitializationStateProvider
  • Enumeration which defines the type of check performed.

    Define if the check is performed against machine learning models in the BlackBerry Cloud, models running locally on the device or solely by evaluating against a local checklist.

    See more

    Declaration

    Swift

    @objc
    public enum CheckType : Int, CaseIterable
  • Enumeration to describe the state for a specific security feature. The status indicates whether the feature is currently enabled or disabled within the runtime.

    See more

    Declaration

    Swift

    @objc
    public enum FeatureStatus : Int, CaseIterable