title: Weak linking to support previous iOS versions
body: <p>I'm trying to support older iOS versions in my app. I initially thought I only have to set those frameworks to "weak linking" that are not present in the older OS, e.g. the iAd framework. And then make sure that I don't call unsupported APIs in the code. However, when I try to run the app (which is compiled with the most recent framework) in the old simulator, it crashes during startup with a message similar to</p>
  
  <pre><code>18/07/2010 11:07:29 UIKitApplication:xxxxx[0xe006][5729]    dyld: Symbol not found: _OBJC_CLASS_$_NSAssertionHandler
  18/07/2010 11:07:29 UIKitApplication:xxxxx[0xe006][5729]      Referenced from: xxxxx/Applications/23CE4978-D25F-4DB4-A486-0730EBBB501B/xxxxx.app/xxxxx
  18/07/2010 11:07:29 UIKitApplication:xxxxx[0xe006][5729]      Expected in: /Xcode3.1.4/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk/System/Library/Frameworks/Foundation.framework/Foundation
  18/07/2010 11:07:29 UIKitApplication:xxxxx[0xe006][5729]     in xxxxx/Applications/23CE4978-D25F-4DB4-A486-0730EBBB501B/xxxxx.app/xxxxx
  </code></pre>
  
  <p>After setting <em>all</em> frameworks to weak linking, I still get an error message: </p>
  
  <pre><code>18/07/2010 11:33:32 UIKitApplication:xxxxx[0xc4a7][8204]    dyld: Symbol not found: __objc_empty_vtable
  18/07/2010 11:33:32 UIKitApplication:xxxxx[0xc4a7][8204]      Referenced from: xxxxx/Applications/23CE4978-D25F-4DB4-A486-0730EBBB501B/xxxxx.app/xxxxx
  18/07/2010 11:33:32 UIKitApplication:xxxxx[0xc4a7][8204]      Expected in: /usr/lib/libobjc.A.dylib
  </code></pre>
  
  <p>What am I doing wrong?</p>