apply(_:completionHandler:)
Applies a set of filtering rules associated with the provider and changes the default filtering action.
Declaration
func apply(_ settings: NEFilterSettings?, completionHandler: @escaping @Sendable ((any Error)?) -> Void)func apply(_ settings: NEFilterSettings?) async throwsParameters
- settings:
A Nefiltersettings object containing the filter settings to apply to the system. Pass
nilto revert to the default settings, which are an empty list of rules and a default action of Filterdata. - completionHandler:
A Swift closure or ObjectiveC block that executes when the system finishes applying the settings. It receives an Nserror parameter; a non-
nilvalue that indicates there’s an error contidition.