saveToPreferences(completionHandler:)
Save your DNS settings configuration to the system networking preferences.
Declaration
func saveToPreferences(completionHandler: @escaping @Sendable ((any Error)?) -> Void)func saveToPreferences() async throwsParameters
- completionHandler:
An optional block that takes an Nserror object. If specified, this block runs on your application’s main thread after the save operation completes. If an error occurs while saving the configuration, the block returns an
NSErrorobject.
Discussion
You must call loadFromPreferences(completionHandler:) at least once before calling this method the first time after your app launches.