title: Using new features while supporting older iOS versions
body: <p>I am developing an app using SDK 8.1, Apple LLVM 6.0 and Xcode 6.1.1. The deployment target is 6.0. I'm using <code>NSOperationQueue</code> and I want to use QoS whenever it's available.</p>
  
  <p>The code I'm using is:</p>
  
  <pre><code>if ([self.operationQueue respondsToSelector:@selector(setQualityOfService:)] 
       &amp;&amp; (&amp;NSOperationQualityOfServiceUserInitiated)) {
      [self.operationQueue performSelector:@selector(setQualityOfService:) withObject: NSOperationQualityOfServiceUserInitiated];
  } else {
      //Other stuff not related to the scope of this question
  }
  </code></pre>
  
  <p>The error I get is:</p>
  
  <blockquote>
    <p>Use of undeclared identifier 'NSOperationQualityOfServiceUserInitiated'</p>
  </blockquote>
  
  <p>I added the <code>if (&amp;NSOperationQualityOfServiceUserInitiated)</code> part to check if this constant exists. This code worked with older versions of Xcode/Obj-C Compiler.</p>
  
  <p>I am able to use selectors with <code>performSelectorWithIdentifier</code> but what about constants that do not have a defined value in the docs? The value of this constant is set by <code>NSQualityOfServiceUserInitiated</code> but there is no definition for this value that can be hardcoded.</p>
  
  <p>How do I fix that?</p>