init(rules:defaultAction:)
Creates a new settings instance from an array of rules and a default action.
Declaration
init(rules: [NEFilterRule], defaultAction: NEFilterAction)Parameters
- rules:
An array containing an ordered list of Nefilterrule objects. The maximum number of rules that this array can contain is 1000.
- defaultAction:
The Nefilteraction to take for flows of network data that don’t match any of the specified rules. The default
defaultActionis Filterdata. IfdefaultActionis Allow or Drop, then therulesarray must contain at least one Nefilterrule.