swift save user defaults as int code example
Example 1: how to fmake sure that data is save in userdefault
UserDefaults.standard.removeObject(forKey: "name")
Example 2: how to fmake sure that data is save in userdefault
if let appDomain = Bundle.main.bundleIdentifier {
UserDefaults.standard.removePersistentDomain(forName: appDomain)
}