I have a Mac application that I must build against the Mac OS 10.4 SDK for various reasons beyond my control. Given that my application’s minimum OS version will be 10.5. (I know, I know… but I can’t give any more details than the above to justify why this is the case.)
Within the Mac OS 10.5 SDK is an API, FSMatchAliasBulk, for which I cannot find a good equivalent in the 10.4 SDK. Knowing that I will be running on Mac OS >= 10.5, how can I get access to the FSMatchAliasBulk at runtime?
First, check out “How Cross-Development Works” in your Xcode Help by selecting “Developer Documentation” from the Xcode Help menu. In the documentation window, type “How Cross-Development Works” and hit return. There you will see more information.
And here is what I think you’ll need to do: load the CoreServices framework and then get the function pointer for that function if you know that you’re running on Mac OS X 10.5 (check out the Gestalt functionality to determine that).
Here is a sample that is not tested, but should lead you in the right direction: