loadFromPreferences(completionHandler:)
Load your DNS settings configuration from the system networking preferences.
Declaration
func loadFromPreferences(completionHandler: @escaping @Sendable ((any Error)?) -> Void)func loadFromPreferences() async throwsParameters
- 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
NSErrorobject.
Discussion
You must call this method at least once before calling saveToPreferences(completionHandler:) for the first time after your app launches.