Initialize an NEEvaluateConnectionRule instance with a list of destination host domains and an action.


init(matchDomains domains: [String], andAction action: NEEvaluateConnectionRuleAction)



An array of domains used to match the destination hostname of connections. If the destination hostname of a connection matches any of the domains in the array, then the connection matches the rule. Each domain is matched against the destination hostname using suffix matching, and each label in the domain must match an entire label in the hostname. For example, the domain will match the hostname but not


The action to apply for connections matching the rule.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software