title: UserDefaults value seems to be reset every few runs of the app
body: <p>I have some popup alerts that I want to come up ONLY when it is a user's very first time in the app. As an example, I have this alert:</p>
  
  <pre><code>func showTip() {
      let userDefaults = UserDefaults.standard
  
      if userDefaults.bool(forKey: "firstRun") {
          let alertController = UIAlertController(title: "Welcome", message: "Welcome! Go ahead and create a chat room", preferredStyle: UIAlertControllerStyle.alert)
  
          let okAction = UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: {(alert :UIAlertAction!) in
          })
          alertController.addAction(okAction)
  
          present(alertController, animated: true, completion: nil)
          userDefaults.set(false, forKey: "firstRun")
      }
  }
  </code></pre>
  
  <p>That should come up, as I said, only on the very first run of the app. I set the user defaults values in AppDelegate in <code>didFinishLaunchingWithOptions</code>:</p>
  
  <pre><code>    let userDefaults = UserDefaults.standard
      let defaultValues = ["firstRun" : true]
      userDefaults.register(defaults: defaultValues)
  </code></pre>
  
  <p>However the popup is showing frequently. I haven't noticed any sort of pattern, and it doesn't come up every single run, but every few times I run the app the alert comes up.</p>
  
  <p>Is there any way I can make it so after the first time the alert comes up, it's disabled entirely for that user?</p>