title: IOS Dev Value of type 'AppDelegate' has no member 'managedObjectContext' Xcode 10
body: <p>I am following a Udemy tutorial <a href="https://www.udemy.com/course/ios-9-swift-2-xcode-7-make-an-app-programming-code-ios9-dev/learn/lecture/3461630#questions/920550" rel="nofollow noreferrer">Link</a>. This is my first time working with Core Data. This is what they have:</p>
  
  <pre><code>let context = (UIApplication.sharedApplication().delegate as! AppDelegate).managedObjectContext 
  </code></pre>
  
  <p>this is what I have:</p>
  
  <pre><code>let context = (UIApplication.shared.delegate as! AppDelegate).managedObjectContext
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>Value of type 'AppDelegate' has no member 'managedObjectContext'</p>
  </blockquote>
  
  <p>Can anyone point me in the right direction to understand if it is a syntax problem or did I not create something.</p>