Type Method

getStateOfContentBlockerWithIdentifier:completionHandler:

Determines the state of your content blocker.

Declaration

+ (void)getStateOfContentBlockerWithIdentifier:(NSString *)identifier completionHandler:(void (^)(SFContentBlockerState *state, NSError *error))completionHandler;

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 enabled property. If the content blocker is enabled, state.isEnabled is YES; otherwise it’s NO. See SFContentBlockerState.