title: How to reference swift app delegate in objective c
body: <p>I am trying to reference swift app delegate in objective C view controller as I want to submit data placed in <code>NSMutableArray</code> to <code>core data</code>.</p>
  
  <p><strong>I have imported</strong> </p>
  
  <pre><code>#import "SPOTEVENT-EventNotificationApp-Bridging-Header.h"
  #import "AppDelegate.swift"
  </code></pre>
  
  <p>in objective C view controller but whenever I am trying to create app delegate instance it gives the error </p>
  
  <blockquote>
    <p>"Unknown type name"</p>
  </blockquote>
  
  <pre><code>AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
      AppDelegate   *appDelegate;
      NSManagedObjectContext *context;
  </code></pre>