title: "dyld: Symbol not found:" for iOS 6-exclusive class in Static Library
body: <p>NOTE: Yes, I know iOS 6 is under NDA. This question has nothing to do with iOS 6, expect for the fact that the class that I'm referencing is <em>new</em> in iOS 6.</p>
  
  <p>I'm creating a static framework for use in several of my projects, which allows me to use a new API in iOS 6 if it's available, and if it's not it'll fall back to an iOS 5 equivalent. However, although I make sure to always check if a class is valid before using it like so:</p>
  
  <pre><code>if ([NewClass class]) {
      NewClass *newClass = [[NewClass alloc] init];
      // etc.
  }
  </code></pre>
  
  <p>Whenever I launch my app in the iOS 5 Simulator, I get the following error:</p>
  
  <pre><code>dyld: Symbol not found: _OBJC_CLASS_$_NewClass
  </code></pre>
  
  <p>(where NewClass stands for the iOS 6 class).</p>
  
  <p>This seems to be an issue just with using a static library, as if I include the certain files that reference the API directly in my project and reference them, it will launch with no issues. I've even tried weak-linking the static library, and it still crashes. The only option that works is weak-linking UIKit, but I would prefer to not have to do that due to UIKit being quite a large framework, and weak-linking takes extra time.</p>
  
  <p>So basically, what can I do to weak link this class in the static library itself?</p>