Why does User Defaults publisher trigger multiple times
问题 I'm subscribing the the built-in User Defaults extension, but it seems to be firing multiple times unnecessarily. This is the code I'm using: import Combine import Foundation import PlaygroundSupport extension UserDefaults { @objc var someProperty: Bool { get { bool(forKey: "someProperty") } set { set(newValue, forKey: "someProperty") } } } let defaults = UserDefaults.standard defaults.dictionaryRepresentation().keys .forEach(defaults.removeObject) print("Before: \(defaults.someProperty)")