diff --git a/Package.swift b/Package.swift index cf586e5..462b8ab 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.2 +// swift-tools-version:5.3 import PackageDescription let package = Package( diff --git a/Sources/Defaults/UserDefaults.swift b/Sources/Defaults/UserDefaults.swift index 147c928..b033317 100644 --- a/Sources/Defaults/UserDefaults.swift +++ b/Sources/Defaults/UserDefaults.swift @@ -140,6 +140,7 @@ extension UserDefaults { - Note: This only removes user-defined entries. System-defined entries will remain. */ public func removeAll() { + // We're not using `.removePersistentDomain(forName:)` as it requires knowing the suite name and also because it doesn't emit change events for each key, but rather just `UserDefaults.didChangeNotification`, which we don't subscribe to. for key in dictionaryRepresentation().keys { removeObject(forKey: key) }