title: UserDefaults.standard.set() is not working
body: <p>I have a reset function that sets an empty string for every key in <code>UserDefaults.standard</code> but it isn't actually resetting them, sometimes it works, sometimes it doesn't, and the weird thing is that sometimes it reset only a few values.</p>
  
  <p>There's nothing that could set the previous values because the reset function once the values are reset, exit the application.</p>
  
  <pre><code>@IBAction func reset(_ sender: Any) {
      //(userDefaults = UserDefaults.standard)
      userDefaults.set("", forKey: "ident")
      userDefaults.set("", forKey: "usr")
      userDefaults.set("", forKey: "psw")
      userDefaults.set("", forKey: "token")
      userDefaults.set("", forKey: "release")
      userDefaults.set("", forKey: "expire")
      userDefaults.set("", forKey: "name")
      userDefaults.set("", forKey: "surname")
      userDefaults.set("", forKey: "ident_req")
      print(userDefaults.string(forKey: "ident")) //output: Optional("")
      exit(1)
  }
  </code></pre>
  
  <p>What should I do??</p>