My application has a multi value settings bundle option. I'd like to catch the event, when this setting has been changed.
I found these possibilities, but I don't know what is the difference between them:
UserDefaults.standard.addObserver(observer: NSObject, forKeyPath: String, options: NSKeyValueObservingOptions, context: UnsafeMutableRawPointer?)
NotificationCenter.default.addObserver(observer: NSObject, forKeyPath: String, options: NSKeyValueObservingOptions, context: UnsafeMutableRawPointer?)
Thanks in advance.