Minor tweaks
This commit is contained in:
parent
93fbdf7f09
commit
d328da99d5
|
@ -1,4 +1,4 @@
|
|||
// swift-tools-version:5.2
|
||||
// swift-tools-version:5.3
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue