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
.
-
Returns check type for SafeBrowsing. This controls how
checkURL(_:completionHandler:)
andcheckIP(_:completionHandler:)
will perform checks.Declaration
Swift
public func safeBrowsingCheckType() -> BlackBerrySecurity.CheckType
-
Returns check type for SafeMessaging. This controls how
checkMessage(body:sender:completionHandler:)
will perform checks.Declaration
Swift
public func safeMessagingCheckType() -> BlackBerrySecurity.CheckType
-
Sets check type for
safeBrowsing
threat typeDeclaration
Swift
public func setSafeBrowsingCheckType(_ checkType: BlackBerrySecurity.CheckType)
Parameters
checkType
Select how content should be checked.
-
Sets check type for
safeMessaging
threat typeDeclaration
Swift
public func setSafeMessagingCheckType(_ checkType: BlackBerrySecurity.CheckType)
Parameters
checkType
Select how content should be checked.
-
hash
Declaration
Swift
public override var hash: Int { get }