Reputation: 22820
OK, so here's my situation :
What do I have to do to make sure it'll show up as "10.6 and later" compatible in the app store?
I managed to get it to compile fine with Base SDK set to either 10.8
or 10.9
, and Deployment Target set to 10.6
. Will that suffice?
P.S. I've tried compiling with Base SDK set to 10.6
, as well, but there are so many errors to be fixed, that it'd be better if I could avoid it.
So any ideas?
Upvotes: 3
Views: 335
Reputation: 34263
The Deployment Target defines the minimum OS version that your app requires at run time.
The Base SDK defines the level of API features that are available at compile time.
Therefore you can use 10.9 as Base SDK when building apps that can run on 10.6 and upwards.
You just have to make sure to avoid code paths that use 10.7/10.8/10.9 APIs when your app runs on a 10.6 machine.
As trojanfoe already pointed out, you can use respondsToSelector:
to check if a certain class/method is available.
Another way is to use NSAppKitVersionNumber:
if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_8)
The NSAppKitVersionNumber constants for the latest SDK can be found in the AppKit Release Notes. Further details can be found in Apple's SDK Compatibility Guide.
Upvotes: 2
Reputation: 122458
Yes; using 10.9 SDK with the deployment target of 10.6 will work fine.
You may find you have conditional code-paths which must be determined at runtime, perhaps based on respondsToSelector
, which will require some #pragma
s in order to compile successfully.
Upvotes: 2