Answers for "UserDefaults clear data"

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 "Swift"

Browse Popular Code Answers by Language