swift storing data in userdefaults code example
Example 1: how to fmake sure that data is save in userdefault
let name = "John Doe"
UserDefaults.standard.set(name, forKey: "name")
Example 2: how to fmake sure that data is save in userdefault
UserDefaults.standard.removeObject(forKey: "name")