title: Building a backwards compatible OS X app, when a new API is present?
body: <p>I'm trying to upgrade an app (<a href="http://tomtaylor.co.uk/projects/clarke/" rel="nofollow noreferrer">Clarke</a>) to provide 10.6 compatibility. </p>
  
  <p>My plan is to use two different code paths depending on the version of OSX in use.</p>
  
  <p>On 10.5 it will use one controller, which consists of completely custom code that isn't dependent on any specific Cocoa API. On 10.6 it will use another controller, which wraps the new CoreLocation API in an identical interface, based on the same abstract class. At runtime the app will switch between the controllers by detecting the OS version.</p>
  
  <p>This works fine on 10.6 built for the 10.6 SDK, but the same build blows up on 10.5 with:</p>
  
  <pre><code>10/09/2009 18:30:50 [0x0-0x12f12f].uk.co.tomtaylor.Clarke[4575] dyld: unknown required load command 0x80000022 
  10/09/2009 18:30:51 com.apple.launchd[403] ([0x0-0x12f12f].uk.co.tomtaylor.Clarke[4575]) Exited abnormally: Trace/BPT trap 
  </code></pre>
  
  <p>If I build for 10.5 SDK it can't compile the CoreLocation stuff, obviously.</p>
  
  <p>I'd hoped to be able to provide a single binary for this application. Is there a way to 'hide' the CoreLocation API from 10.5?</p>