Answers for "how to clear a value for user defauls in swift"

1

swift clear user defaults

let domain = Bundle.main.bundleIdentifier!
UserDefaults.standard.removePersistentDomain(forName: domain)
UserDefaults.standard.synchronize()
print(Array(UserDefaults.standard.dictionaryRepresentation().keys).count)
Posted by: Guest on March-05-2020

Code answers related to "how to clear a value for user defauls in swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language