Type Method

getStateOfContentBlocker(withIdentifier:completionHandler:)

Determines the state of your content blocker.

Declaration

class func getStateOfContentBlocker(withIdentifier identifier: String, completionHandler: @escaping (SFContentBlockerState?, Error?) -> Void)

Parameters

identifier

The bundle identifier of your content blocker extension.

completionHandler

The code block to invoke with the state of the content blocker.

Discussion

The state parameter of the completion handler’s SFContentBlockerState contains the isEnabled property. If the content blocker is enabled, state.isEnabled is true; otherwise it’s false. See SFContentBlockerState.