I'm trying to upgrade an app (Clarke) to provide 10.6 compatibility.
My plan is to use two different code paths depending on the version of OSX in use.
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.
This works fine on 10.6 built for the 10.6 SDK, but the same build blows up on 10.5 with:
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
If I build for 10.5 SDK it can't compile the CoreLocation stuff, obviously.
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?