title: Cannot create a reference to AppDelegate Class in Swift
body: <p>I am a beginner programmer and I am targeting OSX. I want to create a reference to the managed object context property thats inside AppDelegate, to use it in a Core Data project I'm creating</p>
  
  <p>I try </p>
  
  <pre><code>let appDelegate = UIApplication.sharedApplication().delegate as AppDelegate
  let aVariable = appDelegate.someVariable
  </code></pre>
  
  <p>or make it mutable, typing var instead of let.
  Can anyone give me some help, please?</p>
  
  <p>Thanks</p>