let domain = Bundle.main.bundleIdentifier! UserDefaults.standard.removePersistentDomain(forName: domain) UserDefaults.standard.synchronize() print(Array(UserDefaults.standard.dictionaryRepresentation().keys).count)