title: Objective-C 10.10 NSApplication delegate cannot call method defined in delegate class
body: <p>tldr, the simple question is: in OS X 10.10 I cannot call methods defined in a delegate class.</p>
  
  <p>Some information as below:</p>
  
  <p>I have a sample Cocoa project, which has a delegate class, and its method defined as below:</p>
  
  <pre><code>@interface SPVAppDelegate : NSObject &lt;NSApplicationDelegate&gt;
  - (void)doSomething;
  end
  </code></pre>
  
  <p>If I compile the project with 10.9 SDK, I can call this method doSomething in other part of the program like this:</p>
  
  <pre><code>[[NSApp delegate] doSomething];
  </code></pre>
  
  <p>But, with 10.10 SDK, I would get this error when compiling the project:</p>
  
  <pre><code>No known instance method for selector 'doSomething'
  </code></pre>
  
  <p>Why this method is not found if I use 10.10 SDK? Is there anything changed in the API here?</p>