title: Userdefaults value not persisting despite being synchronized?
body: <p>I am utilizing UserDefaults to save a small value that occasionally needs to be written to. I believe I have it set up correctly, but I am not sure why it is not working after I quit the simulator and start it back up again.
  The set up:</p>
  
  <pre><code>let defaults = UserDefaults.standard
  </code></pre>
  
  <p>It is then written to/modified as follows:</p>
  
  <pre><code>defaults.set(true, forKey: "defaultsChecker")
  defaults.synchronize()
  </code></pre>
  
  <p>Using a print statement I can see that the value is indeed updated from being nil to being true. However, checking the value in a <code>viewDidLoad</code> at the onset of turning the simulator on again (after being quit) as follows:</p>
  
  <pre><code>print("The value is is \((defaults.value(forKey: "defaultsChecker") as! Bool)))")
  </code></pre>
  
  <p>This always returns nil at the onset, meaning that it must not be saved/persist through the closing and reopening of the simulator. Not sure why this is the case.</p>