title: Save variable after my app closes (swift)
body: <p>I'm trying to save a variable in Xcode so that it saves even after the app has closed, how ever when I access it I do it from a several different classes and files, and I change the value of the variable when I access it. Therefore similar threads do not completely apply, the value to be stored is a string and here is the code I have up until now:</p>
  
  <pre><code>var defaults: NSUserDefaults = NSUserDefaults.standardUserDefaults()
  defaults.setObject(Token, forKey: "") as! String
  </code></pre>
  
  <p>I believe this is the correct format, but I don't know how to call it to change it because when I try I get an error message saying expected declaration.</p>
  
  <p>Anyway any help would be very much appreciated.</p>