title: How to reference app code form a SiriIntent extension?
body: <p>I have setup a SiriKit target within my application recently, but I cannot reference any app code within it.</p>
  
  <p>I have added my app's target to the SiriKit target's Build Targets->Target Dependencies section, but I still get the following errors:</p>
  
  <pre><code>Undefined symbols for architecture arm64:
    "_OBJC_CLASS_$_&lt;CLASSNAME&gt;", referenced from:
        objc-class-ref in IntentHandler.o
  ld: symbol(s) not found for architecture arm64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>Where  is the name of a app class I am trying to reference in the IntentHandler.m class.</p>
  
  <p>I am able to import the app code class I need to use just fine, but if I try to use it in actual code it results in the error.</p>
  
  <p>Everything "seems" fine with the code too, which is odd.  Syntax highlighting works, ctrl+click brings me to the appropriate class, etc, so it's clearly finding the class at some point, just not where it matters most!</p>
  
  <p>My code is like this:</p>
  
  <pre><code>#import "IntentHandler.h"
  #import "&lt;CLASSNAME.h&gt;
  
  @interface IntentHandler () &lt;INSearchForPhotosIntentHandling&gt;
  
  @end
  
  @implementation IntentHandler
  
  - (id)handlerForIntent:(INIntent *)intent {
      return self;
  }
  
  #pragma mark - INSearchForPhotosIntentHandling
  - (void)handleSearchForPhotos:(INSearchForPhotosIntent *)intent completion:(void (^)(INSearchForPhotosIntentResponse *response))completion {
      NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType:NSStringFromClass([INSearchForPhotosIntent class])];
      Object test = [[&lt;CLASSNAME&gt; instance] getObjectWithName:@"test"];
      // do stuff with the test Object, which may require me to send the response as INSearchForPhotosIntentResponseCodeFailureRequiringAppLaunch
      // but for now just return INSearchForPhotosIntentResponseCodeContinueInApp.
      INSearchForPhotosIntentResponse *response = [[INSearchForPhotosIntentResponse alloc] initWithCode:INSearchForPhotosIntentResponseCodeContinueInApp userActivity:userActivity];
      completion(response);
  }
  
  @end
  </code></pre>