Contents

loadFromPreferences(completionHandler:)

Load your DNS settings configuration from the system networking preferences.

Declaration

func loadFromPreferences(completionHandler: @escaping  @Sendable ((any Error)?) -> Void)
func loadFromPreferences() async throws

Parameters

  • completionHandler:

    A block that takes an Nserror object. This block runs on your application’s main thread after the load operation is complete. If an error occurs while loading the configuration, the block returns an NSError object.

Discussion

You must call this method at least once before calling saveToPreferences(completionHandler:) for the first time after your app launches.

See Also

Managing DNS configurations