Instance Method


Loads the current DNS proxy configuration from the caller's DNS proxy preferences.


func loadFromPreferences(completionHandler: @escaping (Error?) -> Void)



A block called when the load operation completes. If the operation fails, an error instance passed to this block describes the problem. Otherwise, the error is nil. See NEDNSProxyManagerError for the list of possible errors.


Initially, the DNS proxy configuration comes from a configuration profile stored on the device in a managed environment, as described in Configuration Profile Reference.

When you want to inspect or make changes to the configuration, you call the proxy manager's loadFromPreferences(completionHandler:) method. This causes the system to load the configuration into the manager's providerProtocol and isEnabled properties.

If you modify the configuration stored in these properties, you must then call the saveToPreferences(completionHandler:) method to make the changes take effect. Saving the preferences also stores the modified configuration on disk for use the next time the proxy is started or the configuration is loaded.

See Also

Managing the DNS Proxy Configuration

class func shared() -> NEDNSProxyManager

Returns a singleton DNS proxy manager instance.

func saveToPreferences(completionHandler: (Error?) -> Void)

Saves the DNS proxy configuration in the caller's DNS proxy preferences.

func removeFromPreferences(completionHandler: (Error?) -> Void)

Removes the DNS proxy configuration from the caller's DNS proxy preferences.