ContentCheckerRules

@objc
public class ContentCheckerRules : NSObject
extension ContentCheckerRules: NSCopying

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.