How to make code running on different version of the OS ?

I want my app running on 10.1.x, 10.2.x, 10.3.x but there are new functions only available on some versions and not on earlier ones…
If the dependance to newer functionality is limited in a few calls, you can use NSIsSymbolNameDefined and NSAddressOfSymbol as in getpath.c.
If large bunch of your code is concerned and /or emulating the non-existing call on one platform requires a lot of code, you could put the specific code for each platform in separate bundle (plug-ins) and load the right one at beginning of your application after testing under which version of the OS your app is running (using
Gestalt, NSAppKitVersionNumber, …).