title: Initialising ' ... *__strong' with an expression of incompatible type 'id<UIApplicationDelegate> _Nullable'
body: <p>I have just updated my copy of Xcode and find that I now have lots of warnings. I am struggling to get the following one sorted out though:</p>
  
  <pre><code>ObAppDelegate *appdelegate = [[UIApplication sharedApplication]delegate];
  </code></pre>
  
  <p>causes this warning:</p>
  
  <blockquote>
    <p>Initializing <code>ObAppDelegate *__strong</code> with an expression of
    incompatible type <code>id&lt;UIApplicationDelegate&gt; _Nullable</code></p>
  </blockquote>
  
  <p>Can anyone point me in the right direction to fix this warning? For information this is the related code used prior to the problem line:</p>
  
  <pre><code>- (NSManagedObjectContext *) managedObjectContext {
      return [(ObAppDelegate *) [[UIApplication sharedApplication] delegate] managedObjectContext];
  }
  </code></pre>